After some experimentation with implementing S4 methods, the R6 OOP system appears to be a good candidate for this particular use case. Specifically, the reference semantics (i.e., modify-in-place / mutability) and method chaining will allow for various subsetting actions followed plotting with on-the-fly calculation of ggplot2 scale and theme values. Actions that have previously been exported superfluously can move to public / private methods related to either the superclass or subclasses for mapping / phylogenetic analysis.
Initially, create superclass for specimen records and associated methods to:
Subset by geographic coordinate
Filter by specimen annotation
Find specimen record(s) by collector or collection
After some experimentation with implementing S4 methods, the R6 OOP system appears to be a good candidate for this particular use case. Specifically, the reference semantics (i.e., modify-in-place / mutability) and method chaining will allow for various subsetting actions followed plotting with on-the-fly calculation of
ggplot2
scale and theme values. Actions that have previously been exported superfluously can move to public / private methods related to either the superclass or subclasses for mapping / phylogenetic analysis.Initially, create superclass for specimen records and associated methods to: