[R] Installing packages into updated R
Henric Nilsson
henric.nilsson at statisticon.se
Tue Dec 20 17:23:59 CET 2005
On Ti, 2005-12-20, 16:11, Michael H. Prager skrev:
> A minor inconvenience in updating an R installation is remembering which
> packages were installed previously. Has anyone written a script to
> inspect a previous installation, then get & install the same packages
> into the new installation?
If the previous installation is still alive, fire it up and
pS <- packageStatus()
pkgs <- pS$inst$Package[!pS$inst$Priority %in% c("base", "recommended")]
save(pkgs, file = "foo")
In the new installation,
load("foo")
install.packages(pkgs)
HTH
Henric
More information about the R-help
mailing list