3 ms·
wardmap@data is the data slot in the S4 object wardmap. A little advanced…
by dash2 3y ago
wardmap@data is the data slot in the S4 object wardmap. A little advanced…
- nomilk 3y agoHadn't come across it. An assignment pipe should be a relatively easy sell since it produces more concise code, and lets the developer work left to right, top to bottom (how we all want to work), rather than having to backtrack to place `df <- ` at the start. I'd try demo it on super common use cases (so the average R user can easily see how coding patterns are improved by it). Found the Stack Overflow question: https://stackoverflow.com/q/34500567 https://stackoverflow.com/q/34500567 EDIT: came across a nice explanation of the S4 system [1] under the 'Overview' and 'Slots and accessor functions' sections. Seems it's commonly used in genetics and geospatial work. [1] https://kasperdanielhansen.github.io/genbioconductor/html/R_S4.html#:~:text=The%20S4%20system%20in%20R,also%20known%20as%20reference%20classes https://kasperdanielhansen.github.io/genbioconductor/html/R_...).