From info at aghmed.fsnet.co.uk  Wed Jun  2 19:14:45 2010
From: info at aghmed.fsnet.co.uk (Michael Dewey)
Date: Wed, 02 Jun 2010 18:14:45 +0100
Subject: [Rd] warning from install.packages()
In-Reply-To: <loom.20100601T142323-304@post.gmane.org>
References: <4BFC3228.9010400@ufl.edu> <C822177B.EBC1%jari.oksanen@oulu.fi>
	<loom.20100601T142323-304@post.gmane.org>
Message-ID: <Zen-1OJrWm-0006gD-SM@smarthost02.mail.zen.net.uk>

At 13:40 01/06/2010, Ben Bolker wrote:

> > On 25/05/10 23:25 PM, "Ben Bolker" <bolker <at> ufl.edu> wrote:
> >   Just curious: is there a particular reason why install.packages()
> > gives a warning in normal use when 'lib' is not specified (e.g. argument
> > 'lib' is missing: using '/usr/local/lib/R/site-library' )?

As I see it R is saying 'I am doing what you told 
me, but just in case I am checking whether that 
was what you really wanted'. Note that you do not 
get a warning if there was only one place R could 
put it. I would certainly vote for a message if 
people are getting unnecessarily alarmed by the warning.


>   Bump.
>
>
> >From install.packages in utils/R/packages2.R:
>
>       if(missing(lib) || is.null(lib)) {
>         lib <- .libPaths()[1L]
>         if(length(.libPaths()) > 1L)
>             warning(gettextf("argument 'lib' is missing: using '%s'", lib),
>                     immediate. = TRUE, domain = NA)
>     }
>
>
>   If I were patching this I would simply comment out this whole test
>(rather than making a message() ?  la Jari Oksanen) -- it seems to
>make the most sense to execute the documented behavior silently ...
>
>   I will submit this as a wishlist item shortly if no-one complains.
>
>    Ben Bolker

Michael Dewey
http://www.aghmed.fsnet.co.uk



[Rd] warning from install.packages()
Michael Dewey