I have a file helper.RData file in my inst/extdata that contains variables and datasets to be used by the functions in my package, but not meant to be accessed by the user.
I load it at the beginning of the package using:
load(system.file("extdata","helper.RData", package = "mypackage"))
As the file is big this takes quite a bit of time and it is especially annoying
during development (I use quite a loot the function load_all()
from the devtools
package).
I would rather prefer to have it lazy loaded so that the file is loaded only when actually needed.
How can I do that?