[R-SIG-Mac] Help with running R from within Aquamacs

Quan Li quanli at mail.ucf.edu
Mon Feb 11 16:02:10 CET 2008


Thanks to Kasper and Simon. I was indeed wrong about where the packages were stored. In R, .libPaths() returned the following:

[1] "/Users/useradmin/Library/R/2.6/library"                        
[2] "/Library/Frameworks/R.framework/Versions/2.6/Resources/library"

the packages that came with R were stored in [2] and the packages I downloaded were stored in [1]

however, in Aquamacs, .libPaths() returned

[1] "/Library/Frameworks/R.framework/Resources/library"

I temporarily solved the problem by moving all the packages to  "/Library/Frameworks/R.framework/Resources/library"

without tinkering with the .Rprofile file, is there a way to make Aquamacs to point to both paths instead of just one?

Also, when I run R from within Aquamacs, the Quartz device does not work. I tested with
a<-c(1:10)
b<-c(1:10)
plot(a,b)

in R, I got a scatter plot, but from within Aquamacs, it says evaluation is finished but I don't see the Quartz window. Please advice. 

quan

>>> Simon Urbanek <simon.urbanek at r-project.org> 2/9/2008 4:02 PM >>>

On Feb 9, 2008, at 12:33 PM, Kasper Daniel Hansen wrote:

> On Feb 8, 2008, at 7:23 AM, Quan Li wrote:
>
>> Hello,
>>
>> I had a rookie question. I can load add-on packages in R but cannot
>> do so when R is run from within Aquamacs. The error message says
>> "there is no package labeled "lattice"", for example. All my
>> packages are stored in R's library. Any help on this is much
>> appreciated.
>
> My guess is that you are wrong and that your packages are stored
> elsewhere (than the system library which is /Library/Frameworks/
> R.framework/Resources/library. A good guess would be ~/Library/R. You
> can check this using
> R> installed.packages()

And even better check .libPaths() [see the FAQ].


> A way to fix this is to make a ~/.Rprofile file containing, sat
>   .libPaths("~/Library/R")

I would discourage this as it won't be compatible with the R GUI  
setting. Also it is a source of many problems as people forget to  
update their packages with R version.

Cheers,
Simon



More information about the R-SIG-Mac mailing list