Activation determines the context of subsequent manipulations, i.e. you have an object with multiple entities and you want the next functions that operate on that object to do their work in the context of one of those entities.
In real terms this might be list of multiple tables, activation brings one of those tables to the front. See tidygraph and ncdump for specific examples.
The activate package enables the addition of activation as a process to types in other packages.
# NOT YET AVAILABLE Install from CRAN
##install.packages("activate")
# Or the development version from GitHub
# install.packages("devtools")
devtools::install_github("r-gris/activate")
library(activate) will load the package, but it will be normally used by other package developers whose users will be able to determine what is the active component, or activate a different component in a pipeline, or directly set the active status.
active(object)
#' [1] "sub-object01"
object %>% activate("sub-object05")
active(object) <- "sub-object03"
A simple context-controlling mechanism to 'activate' a named sub-entity in an object. The generic functions are provided with bare default methods and no checking. It is expected that other packages will import the generic and specialize it.
See the vignettes. TBD
Your package may need to
activate, active and active<-