set6: R6 Mathematical Sets Interface
Raphael Sonabend, Franz J. Király · The Journal of Open Source Software · 2020
set6 makes use of the R6 object-oriented paradigm to introduce classes for important mathematical objects, including sets, tuples, and intervals (finite and infinite).Until now, the R (R Core Team, 2017) programming language has traditionally supported mathematical sets in one of two ways: 1. via the five set operation functions: union, intersect, setdiff, setequal, is.element; and 2. via the sets (Meyer & Hornik, 2009) package.set6 uses R6 (Chang, 2018) and has a clear class interface with minimal dependencies, which makes it the perfect dependency for any package that requires mathematical data types as R6 objects.Making use of design patterns (Gamma et al., 1996), such as wrappers and compositors, set6 allows for symbolic representation of sets to ensure maximum efficiency, and to provide neat and clear print methods.