Skip to content

Instantly share code, notes, and snippets.

@ramnathv
Last active December 18, 2015 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ramnathv/5750561 to your computer and use it in GitHub Desktop.
Save ramnathv/5750561 to your computer and use it in GitHub Desktop.
Code to Download RStudio Logs
# Here's an easy way to get all the URLs in R
start <- as.Date('2012-10-01')
today <- as.Date('2013-06-10')
all_days <- seq(start, today, by = 'day')
year <- as.POSIXlt(all_days)$year + 1900
# this line is modified from the version on the rstudio blog
urls <- paste0('http://cran-logs.rstudio.com/', year, '/', all_days, '.csv.gz')
# You can then use download.file to download into a directory.
# If you only want to download the files you don't have, try:
missing_days <- setdiff(all_days, tools::file_path_sans_ext(dir(), TRUE))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment