[R-SIG-Mac] How to move existing packages?

Ian Gow iandgow at gmail.com
Wed Apr 10 01:10:29 CEST 2013


For me !(a %in% rownames(installed.packages())) gives a vector of {TRUE,
FALSE}; so, Simon's second approach didn't work. But the following
(mostly) works:

a <- 
rownames(installed.packages("/Library/Frameworks/R.framework/Versions/2.15/
Resources/library"))
to.install <- setdiff(a, rownames(installed.packages()))
install.packages(to.install)


This didn't work for lme4. So, after installing gfortran-4.2.3.pkg from
<http://cran.r-project.org/bin/macosx/tools/gfortran-4.2.3.pkg> (I already
had all the other needed tools under R 2.15, I guess), I ran the following:

to.install <- setdiff(a, rownames(installed.packages())) # Now just "lme4"
install.packages(to.install, type="source")


On 4/9/13 12:41 PM, "Simon Urbanek" <simon.urbanek at r-project.org> wrote:

> On Apr 9, 2013, at 12:28 PM, Petar Milin wrote:
> 
>> Hello!
>> I am new to Mac and I wonder is there a way to migrate all existing
>> packages to the latest R 3.0? I did that for my colleague who uses MS
>> Win, and that never was as issue in Linux. So, what are our options
>> under Mac OS X?
>> 
> 
> You can either use the GUI (in the Package Installer -> "Select Packages
> from R 2.15" -> Install) or the command line:
> 
> a=rownames(installed.packages("/Library/Frameworks/R.framework/Versions/2.
> 15/Resources/library"))
> install.packages(!(a %in% rownames(installed.packages())))
> 
> The latter works on any OS.
> 
> Cheers,
> Simon
> 
> 
> 
>> Many thanks,
>> PM
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>> 
>> 
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list