[R] Package repository on Linux machine and upgrading R
Peter Dalgaard
pdalgd at gmail.com
Mon Aug 23 00:24:17 CEST 2010
On 08/22/2010 10:08 PM, Patrick Connolly wrote:
> On Fri, 20-Aug-2010 at 06:16PM -0700, Vinh Nguyen wrote:
>
> |> Dear list,
> |>
> |> I remember running into a thread on this topic in one of the R mailing
> |> lists before but I can't seem to find it now. Basically, I remember a
> |> discussion on how one can set up where R packages can be installed so
> |> that when we upgrade the R version on the machine, the packages are
> |> still accessible. One can back up this package location as well and
> |> bring it to a new computer. I remember Dirk Edd being one of the
> |> discussants.
> |>
> |> Can someone point me to this discussion? Thanks.
>
>
> ?.libPaths
That won't cut it, Patrick. It will help, but it is hardly the whole story.
Perhaps Nguyen is looking for Brian Ripley's (I think it was him)
suggestion to move/copy the entire library and then use update.packages,
e.g.
cd ~/R/i386-redhat-linux-gnu-library/
mv 2.9 2.11
R
> update.packages(ask=FALSE, checkBuilt=TRUE)
(or ask="graphics"). Then sit back and enjoy the fireworks as everything
in sight gets upgraded.
Notice that you can choose to keep your library in a directory without
the version in its path; the location will then be agnostic to upgrades
(but you may still need to update.packages()), but you obviously won't
have the possibility of distinguishing between multiple versions of R,
which can give both forwards and backwards compatibility problems.
--
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Phone: (+45)38153501
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-help
mailing list