A package like pins which allows you or other packages to include potentially updating sources of data without exceeding the 5MB limit.
Example:
the_data
#> The `the_data` object is not available locally, would you like to download it?
#> 1. Yes
#> 2. No
After obtaining the data for the object, it works as a standard object.
This is possible using the little used feature of R known as 'active bindings'. Essentially regular 'objects' like the_data are treated as functions. The {roam} package will help to create an 'active binding' function that does:
Checks if the object is available locally
If the data is not available, prompt the user to download it during interactive sessions or directly download it if an option is set.
Load the object from the local cache and return it.
A package like
pins
which allows you or other packages to include potentially updating sources of data without exceeding the 5MB limit.Example:
After obtaining the data for the object, it works as a standard object.
This is possible using the little used feature of R known as 'active bindings'. Essentially regular 'objects' like
the_data
are treated as functions. The{roam}
package will help to create an 'active binding' function that does: