There is an R data package I would like to submit to CRAN, but the data is too large. Therefore, I want to design the package so it comes with samples of the full data and users can choose to replace the sample data with the full data.
I wrote a function that lets users download the full data from the cloud. However, once the full data is downloaded, it is inaccessible.
I would be grateful for your help making it so that the full data replaces the sample data.
Example:
# install and load the package
library(devtools)
install_github("stephbuon/hansardr")
library(hansardr)
# Read the sample data
data(hansard_1800)
Then you can download the full Hansard corpus from the cloud:
download_hansard()
The full data will be downloaded to the package's data folder (see: list.files(paste0(.libPaths(), "/hansardr/data"))
)
However, when I use data(hansard_1800)
I still only see the sample data. My hope is that data(hansard_1800)
would now allow the user to access the full data.
Thanks so much for your help.