extdata(..., assign.env = parent.frame())extdata_(..., .dots, assign.env = parent.frame())
This function creates one or more delayed assignments, focusing on data
stored in the extdata
directory, and therefore especially useful for
package development. The main advantage over R's internal data loading
mechanism is faster package build time.
The "dots" argument can be named or unnamed; for unnamed arguments, names
will be assigned by all_dots
. The name of the
RDS file is derived from the argument name and passed over to
read_rds
.
## Not run: # # Creates a delayed assignment "fortytwo" which loads the file # # "extdata/fortytwo.rds" # extdata(fortytwo) # ## End(Not run)