[R] Old packages to updated R

Jon Loehrke jloehrke at umassd.edu
Sun Oct 7 22:55:16 CEST 2007


I am 100% positive there is a better fix for this problem and it has been
discussed.  Thank you in advance for bringing it to my attention.

When upgrading to newer versions of R the old packages are not brought
along in the process.  I solved that problem by creating a list of the
packages in the old version of R, importing them to the new version via a
CSV, and re-installing into the newer R directory.  The script is below.

Is there a more efficient way to do this?  Should I simply attempt to drag
the package folders from the old directory to the new one?  Thanks

## in old version of R<2.6

package<-c(library())
write.csv(package$results, file="file path/oldpackages.csv")


##**  Update R or open updated R version (R=2.60)

package.list<-read.csv(file="file path/oldpackages.csv", header=TRUE)

package.list$Package<-as.character(package.list$Package)

install.packages(c(package.list$Package)) #wait awhile and ignore errors
for base packages.


system:  Mac powerbook intel duo.  Latest OS R 2.60 [now, thanks to
everyone involved]



Jon Loehrke
Fisheries Graduate Research Assistant
School for Marine Science and Technology
UMASS-Dartmouth
838 S. Rodney French Blvd.
New Bedford, MA 02744
Phone: 508-910-6393
Fax:   508-910-6396

"Opportunity is missed by most people because it is dressed in overalls
and looks like work."
--Thomas A. Edison



More information about the R-help mailing list