[R-SIG-Mac] Local level packages not in path

Simon Urbanek simon.urbanek at r-project.org
Tue Apr 24 15:15:56 CEST 2007


James,

On Apr 23, 2007, at 10:35 PM, James wrote:

> I'm completely new to R and it's usage on a Mac.  I'm having a bit  
> of trouble installing packages through the Package Installer  
> interface in R.app.  I'm trying to install the group of Rmetrics  
> packages for option pricing.  When doing so, I'm given the choice  
> of installing at the "System Level" or the "Local Level".  I chose  
> to install at the local level.  The packages appear to have been  
> correctly installed to ~/Library/R/library/.  The problem appears  
> to be that the location is not in my path.
>
>> .libPath()
> [1] "/Library/Frameworks/R.framework/Versions/2.4/Resources/library"
>
> So system level packages are available, but not local level  
> packages.  I see under preferences for R.app, under Startup, the  
> ability to set the "Default Library Paths".  There is a check box  
> to "Add $HOME/R/Library".  Is this what I need to set to get my  
> local level packages added to my path?

Yes.

> Additionally, it says that I have to restart R.app for this to take  
> effect.  When I restart, the box is unchecked again.

That is indeed curious. Unfortunately you didn't  share with us any  
crucial information such as the version of R and GUI you are using.  
At least in the current version I cannot reproduce the behavior you  
describe. Checking the box prepends the local path to .libPaths() as  
designed.

Are all other preferences working fine? If not, there may be some  
permission issues in your home. If they do, you can try to move ~/ 
Library/R aside to make sure there are no permission issues either.


> And finally, is there just a text file or something that I could  
> edit to make this addition?  It seems like those persons not using  
> R.app, namely everyone on Linux, Windows, and some Mac users would  
> need a way to set this.
>

Sure, you can set it in many ways, they are all documented in R  
documentation and Kasper did a great job explaining them.

Cheers,
Simon



More information about the R-SIG-Mac mailing list