[R] Location of Packages?
Steve Lianoglou
mailinglist.honeypot at gmail.com
Mon Sep 14 18:26:01 CEST 2009
Hi,
On Sep 14, 2009, at 12:03 PM, ivo welch wrote:
> Sorry, one more: on OSX, I deleted my old 2.9.2 R.app, and installed
> the 64
> bit version of 2.9.0. I then did an "install.packages("car")" under
> my new
> 2.9.0. It seems to have worked, but alas, I still get an error that
> package
> 'car' was built under R version 2.9.2 . Where exactly does R under
> OSX
> install its packages? (is it a bug that another car is loaded?)
/Library/Frameworks/R.framework/Resources/library/
You'll see that the Resources folder is actually a symlink to the
current version's Resources folder:
$ ls -l /Library/Frameworks/R.framework/Resources
/Library/Frameworks/R.framework/Resources -> Versions/Current/Resources
And that the "Current" folder (in Versions/Current) is actually a
symlink to the current version (answering your PPS question below).
$ ls -l /Library/Frameworks/R.framework/Versions/Current
/Library/Frameworks/R.framework/Versions/Current -> 2.10
(2.10 because I'm running R-devel)
> PS: do I need to install the car packages under the 64-bit version,
> or will
> it be seen by the 64 bit version if I do a 32-bit install?
If you are running R in 64 bit mode, you need a 64 bit install of the
package (if it uses compiled code). Note that just because you
downloaded a 64 bit version of R, you might not be running it in 64
bit mode by default.
> for safety, I did it under the command line version,
> which I presume is still 32-bit, and the 64 bit GUI.
I don't understand what you're trying to say here. Assuming you have a
64 bit version of R, you can launch it in 64 bit mode from the
terminal like so:
$ R --arch x86_64
(That's on the http://r.research.att.com/ page, btw).
> PPS: how do I learn which version of R is running?
Along with chasing down the symlinks to the "Current" version of (as
stated above), when you start R, it will tell you in the preamble
before the prompt is up.
If you want to know if the version of R that's currently running is 64
vs. 32 bit, look at the size of the pointer:
R> .Machine$sizeof.pointer
[1] 8
8 means 64 bit, 4 means 32 bit.
-steve
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
More information about the R-help
mailing list