The goal of dlr is to provide a friendly wrapper around the commonpattern of downloading a file if that file does not already existlocally. We also allow for related file-processing tasks, such asprocessing a local file once into the format you’ll need in thefuture.
You can install the released version of dlr fromCRAN with:
install.packages("dlr")And the development version fromGitHub with:
# install.packages("devtools")devtools::install_github("macmillancontentscience/dlr")This package is intended primarily to be used in other packages. Forexample, you might have a function in your package like this.
get_foo<-function() {# Use dlr to find the cache path. If the file isn't already downloaded, dlr# will download it, process it, and save it as an RDS.return( dlr::read_or_cache(source_path ="https://fake.fake/foo.csv",appname ="myCoolPackage",process_f = read.csv ) )}Please note that the dlr project is released with aContributorCode of Conduct. By contributing to this project, you agree to abideby its terms.
This is not an officially supported Macmillan Learning product.
Questions or comments should be directed to Jonathan Bratt(jonathan.bratt@macmillan.com)and Jon Harmon(jonthegeek@gmail.com).