[R-SIG-Mac] lib location different between GUI and terminal?

Simon Urbanek simon.urbanek at r-project.org
Tue May 20 20:11:18 CEST 2008


On May 20, 2008, at 1:43 PM, Ingmar Visser wrote:

> On May 20, 2008, at 5:22 PM, Simon Urbanek wrote:
>> On May 20, 2008, at 11:05 AM, Ingmar Visser wrote:
>>> Hi all,
>>>
>>> I just installed a package using the GUI and install.packages( etc)
>>>
>>> The I opened the terminal and ran R from there and tried to load the
>>> package which
>>> returned with an error saying the package was not available which
>>> seemed strange to me.
>>>
>>> ?install.packages says that the default location for installing
>>> packages is
>>> .libPaths()[1]
>>>
>>> but this turns out to be different in the GUI:
>>>
>>> "/Users/ivisser/Library/R/2.7/library"
>>>
>>
>> Apparently you told the GUI to set it, see R -> Preferences ->  
>> Startup -> Default Library Paths
>>
>> That setting is often used by users that either don't have admin  
>> privileges or want to keep their set of packages separate from the  
>> system ones. The default is off, so you must have enabled it at  
>> some point.
>
> Dear Simon and R mac fans,
>
> After unsetting the default library paths option in the preferences  
> I get:
>
> > .libPaths()[1]
> [1] "/Library/Frameworks/R.framework/Versions/2.6/Resources/library"
>
> And in the terminal I get:
>
> > .libPaths()
> [1] "/Library/Frameworks/R.framework/Resources/library"
>
> After freshly installing 2.7.0 I get in the GUI:
>
> > .libPaths()
> [1] "/Library/Frameworks/R.framework/Versions/2.7/Resources/library"
>
> And after setting the default lib path in the preferences pane:
>
> [1] "/Users/ivisser/Library/R/2.7/library"
> [2] "/Library/Frameworks/R.framework/Versions/2.7/Resources/library"
>
> And in the terminal:
>
> > .libPaths()
> [1] "/Library/Frameworks/R.framework/Resources/library"
>
> In the package install menu the default checked option is at "System  
> level" meaning in the R framework but it seems that that could still  
> be one of two possible paths, ie the versioned path from the GUI or  
> the unversioned path from the terminal.
>

They are both the same. The unversioned path is just a symlink to the  
versioned path. The "real" location is always the versioned path.

Cheers,
Simon



More information about the R-SIG-Mac mailing list