I have a helper.RData file in my inst / extdata that contains variables and data sets that will be used by functions in my package, but not intended for user access.
I load it at the beginning of the package using:
load(system.file("extdata","helper.RData", package = "mypackage"))
Since the file is large, it takes quite a lot of time, and it is especially annoying during development (I use a pretty graph function load_all()from the package devtools).
I would rather have it lazy boot, so that the file only downloads when it is really needed.
How can i do this?
source
share