[R] About upgrade R
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:
>> 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
> All the aforementioned /caveats/ about packages not in CRAN still apply.
> . .
More information about the R-help