[Rd] install.packages() does not warn when 'lib' arg is missing on Linux or Windows

Simon Urbanek simon.urbanek at r-project.org
Fri Jun 9 00:12:41 CEST 2006


Herve,

On Jun 8, 2006, at 9:08 PM, Herve Pages wrote:

> Man page for 'install.packages' says that if the 'lib' arg is missing,
> then it "defaults to '.libPaths()[1]' with a warning".

Where are you quoting from? I read (R 2.3.1):

install.packages can be used to install new packages/bundles. It  
takes a vector of names and a destination library, downloads the  
packages from the repositories and installs them. (If the library is  
omitted it defaults to the first directory in .libPaths(), with a  
warning if there is more than one.)

and that description is correct.


> But, given the 'install.packages' source code, it seems that this  
> warning is issued only when 'length(.libPaths()) > 1'.

This is what the man page says ...


> So typically, this warning will appear on Mac OS X but not on a  
> Linux or Windows systems with default settings.

... and neither on Mac OS X with default settings.


> On my Mac OS X system:
>
>> .libPaths()
>     [1] "/Users/biocbuild/Library/R/Library"

^^ - this is your custom setting, it is not the default

>     [2] "/Library/Frameworks/R.Framework/Versions/2.3/Resources/ 
> library"
>

The default on OS X is

 > .libPaths()
[1] "/Library/Frameworks/R.framework/Resources/library"
 >

in the shell and

 > .libPaths()
[1] "/Library/Frameworks/R.framework/Versions/2.3/Resources/library"
 >

in the GUI (since v1.16).

Cheers,
Simon



More information about the R-devel mailing list