[R] About upgrade R

csrabak crabak at acm.org
Tue Nov 16 00:49:32 CET 2010

Em 14/11/2010 20:42, csrabak escreveu:
> Em 14/11/2010 18:24, Tal Galili escreveu:
>> Hi John, thank you for that input.
>> It could be that the code I wrote here:
>> http://www.r-statistics.com/2010/04/changing-your-r-upgrading-strategy-and-the-r-code-to-do-it-on-windows/
>> Should be updated so every time you install a new R version, you run the
>> code for it to:
>> 1) copy all packages from the old R version to the new R version library
>> 2) update all the packages.
>> But I have no clue how to do step 1.
> I've a clue but not the exact syntax for doing it:
> a) you need to get the library directory path of your current
> installation or if putting it manually;
> b) list.files(path = '<path to your libraries>')
> select the directories with the return of file.info();

I've been educated that all above (a - b) can be obtained in a single 
object with a call to library().

 > libs <- library()

libs$results[,"Package"] will contain the list of installed packages.

> c) save the list for processing in the newer R version;
> d) in the newer version you use the list as argument to
> install.packages().
> All the aforementioned /caveats/ about packages not in CRAN still apply.
> . .
> Regards,


Cesar Rabak

More information about the R-help mailing list