goldingn / versions

Query and Install Specific Versions of Packages on CRAN
Other
24 stars 7 forks source link

Cannot install package from today? #5

Closed AugustT closed 8 years ago

AugustT commented 8 years ago

The function install.versions is failing to install leaflet:

> install.versions(pkgs = 'leaflet', versions = '1.0.0')
Error in download.file(url, file, quiet = TRUE) : 
  cannot open URL 'https://mran.revolutionanalytics.com/snapshot/2016-02-16/src/contrib/Archive/leaflet'

The function did work for a number of packages. I note that the date in the URL is today's date and wonder if that is part of the problem?

I also wonder if this function could be improved by holding the errors until it has tried to install all packages? Currently this error stops the installation of all packages in my call to install.versions.

goldingn commented 8 years ago

Hmmm...

leaflet does not appear to be listed on MRAN or CRAN. Probably because it has never been updated (added to CRAN at version 1.0.0 in 2014 and not touched since).

You get the same error with versions:

install.versions('versions', '0.1')
curl: (22) The requested URL returned error: 404 Not Found
 Error in url.lines(url) : 
  URL does not appear to exist: https://mran.revolutionanalytics.com/snapshot/2016-02-16/src/contrib/Archive/versions

I think something must have changed with the structure of CRAN as I'm pretty sure I tried these out before...

goldingn commented 8 years ago

This now works for me:

devtools::install_github('goldingn/versions')
library('versions')
install.versions(pkgs = 'leaflet', versions = '1.0.0')

Need to update on CRAN next. Well spotted!