Herve Pages
2006-Jun-08 19:08 UTC
[Rd] install.packages() does not warn when 'lib' arg is missing on Linux or Windows
Hello, Man page for 'install.packages' says that if the 'lib' arg is missing, then it "defaults to '.libPaths()[1]' with a warning". But, given the 'install.packages' source code, it seems that this warning is issued only when 'length(.libPaths()) > 1'. So typically, this warning will appear on Mac OS X but not on a Linux or Windows systems with default settings. On my Mac OS X system: > .libPaths() [1] "/Users/biocbuild/Library/R/Library" [2] "/Library/Frameworks/R.Framework/Versions/2.3/Resources/library" but on my Linux system: > .libPaths() [1] "/home/hpages/arch/x86_64/R-2.3.1/library" I'm using R-2.3.1 on both systems. Best, H. -- ------------------------ Herv? Pag?s E-mail: hpages at fhcrc.org Phone: (206) 667-5791 Fax: (206) 667-1319
Prof Brian Ripley
2006-Jun-08 19:17 UTC
[Rd] install.packages() does not warn when 'lib' arg is missing on Linux or Windows
On Thu, 8 Jun 2006, Herve Pages wrote:> Hello, > > Man page for 'install.packages' says that if the 'lib' arg is missing, > then it "defaults to '.libPaths()[1]' with a warning". > But, given the 'install.packages' source code, it seems that this warning > is issued only when 'length(.libPaths()) > 1'. > So typically, this warning will appear on Mac OS X but not on a Linux > or Windows systems with default settings.Yes, and what is the problem with that?> On my Mac OS X system: > > > .libPaths() > [1] "/Users/biocbuild/Library/R/Library" > [2] "/Library/Frameworks/R.Framework/Versions/2.3/Resources/library" > > but on my Linux system: > > > .libPaths() > [1] "/home/hpages/arch/x86_64/R-2.3.1/library" > > I'm using R-2.3.1 on both systems. > Best, > > > H. > >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Simon Urbanek
2006-Jun-08 22:12 UTC
[Rd] install.packages() does not warn when 'lib' arg is missing on Linux or Windows
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