installr icon indicating copy to clipboard operation
installr copied to clipboard

allow download_RStudio_CRAN_data to subsample from a range of dates

Open apsteinmetz opened this issue 5 years ago • 2 comments

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.

apsteinmetz avatar Feb 27 '19 18:02 apsteinmetz