[R] install package version compatible with on older version of R

Uwe Ligges ligges at statistik.tu-dortmund.de
Sun Aug 23 20:32:57 CEST 2009



Renaud Gaujoux wrote:
> Hi,
> 
> I'm trying to install Chipster (for microarray analysis: 
> http://chipster.csc.fi/), which expressly relies on R 2.6.1 (for now).
> 
> So I'd like to install automatically (i.e. using a 'install.packages' like 
> function) the last version of a package compatible with the running R 
> version.
> For example, when I'm running R-2.6.1 and want to install package 'lme4' I 
> get the following warning:
> 
> In install.packages("lme4", repos = 
> contrib.url("http://cran.r-project.org")) :
> package ‘lme4’ is not available
> 
> Also:
> available.packages(contriburl = contrib.url("http://cran.r-project.org")) 
> does not return any line for package lme4.
> This is because the latest version of package lme4 on CRAN depends on R 
> 2.9.0. However there is older versions stored on CRAN that are compatible 
> with R version 2.6.1 (in subdirectory contrib/Archive/lme4).
> 
> Is there a script/package out there that does the trick, retrieving the 
> list of the older versions and download the latest version compatible with 
> R 2.6.1?

What you want should already work for Windows and Mac but not for source 
package installations (e.g. for Unix-alikes installing from the source 
repository).
CCing Kurt Hornik since we have had discussions about whether to provide 
such a feature or not.

Best,
Uwe Ligges





> Thanks
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list