Create delayed assignments for all datasets in a package

Usage

auto_extdata(assign.env = parent.frame())

Arguments

assign.env
The environment in which to create the delayed assignments.

Description

This function lists all .rds files in the extdata/ directory and calls read_rds. This offers an easy method to simulate R's lazy-loading mechanism for data: Place all datasets in individual .rds files in extdata/, and call this function somewhere in your package's source files.

Examples

## Not run: # auto_extdata() # ## End(Not run)