Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force older packages to install on newer versions of R?

Tags:

r

I cannot install proj4string into my current version of R (2.15.1):

Warning message:
package ‘proj4string’ is not available (for R version 2.15.1) 

I assume this is because 2.15.1 is fairly new and the package just hasn't been updated. Is there a general mechanism for forcing R to install an older version of a binary package (realizing that there may be bugs that result)?

like image 261
Ari B. Friedman Avatar asked Oct 10 '12 13:10

Ari B. Friedman


1 Answers

(upgraded from a comment)

Download the relevant package (zip, tarball, whatever) from the archives and install it locally, e.g.

install.packages("proj4string_x.y.z.zip",repos=NULL)

(this is not literal: x.y.z represents the package version)

like image 155
Ben Bolker Avatar answered Nov 15 '22 00:11

Ben Bolker