Create a delayed assignment for a dataset

Usage

extdata(..., assign.env = parent.frame())
extdata_(..., .dots, assign.env = parent.frame())

Arguments

...
Base names for RDS files.
assign.env
The environment in which to create the delayed assignments.
.dots
Base names for RDS files as lazy objects.

Description

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.

Details

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.

Examples

## Not run: # # Creates a delayed assignment "fortytwo" which loads the file # # "extdata/fortytwo.rds" # extdata(fortytwo) # ## End(Not run)