installr
installr copied to clipboard
allow download_RStudio_CRAN_data to subsample from a range of dates
Boy, download_RStudio_CRAN_data()
can sure create a big request! Rather than choose a range of consecutive dates I wanted to sample a few days from a wider range. For instance, 5 random days over the past year.
I added subsample=NULL
to the function parameters and this code to the function
if (is.numeric(subsample)){
all_days <- sample(all_days,min(length(all_days),subsample))
}
If you like it, I'll issue a pull request. Thanks. PS: I've never contributed to a package before.