Re: [Rd] The "lib" argument in install.packages().

From: Peter Ehlers <ehlers_at_ucalgary.ca>
Date: Wed, 25 Nov 2009 00:41:32 -0700

Rolf,

If you want to avoid the warning, why not use lib=.libPaths()[1]? This is not to say that your suggestions aren't useful.

Cheers,
Peter Ehlers

Rolf Turner wrote:
>
> I was flummoxed for a long time by errors generated when I did
> something like
>
> install.packages(foo,lib="Rlib")
>
> where ``Rlib'' is my personalized directory of R packages, which
> lives in my home directory (from which I started R before issuing
> the foregoing install.packages() call.
>
> Recently someone (I forget who, but thanks very much to whomever
> it was) pointed out that I needed to specify the complete pathname,
> i.e. "/Users/rturner/Rlib" rather than the relative pathname "Rlib"
> or "./Rlib" (which I'd also tried). When the complete pathname is
> given the install.packages() call works seamlessly.
>
> Remark: I have "/Users/rturner/Rlib" as the first entry of my .libPaths(),
> so just doing install.packages(foo) works --- but this gives a warning
> about lib not being specified, which I find irksome.
>
> Questions:
>
> (1) Why is it that the complete pathname of ``lib'' has to
> be specified? Cannot the code of install.packages() be
> adjusted to work with relative pathnames?
>
> (2) If indeed this is not possible, wouldn't it be kind and
> helpful, to us young ( :-) ) and naive persons, to put an
> indication in the help file for install.packages that the
> complete pathname is required?
>
> cheers,
>
> Rolf Turner
>
> P. S. > sessionInfo()
> R version 2.10.0 (2009-10-26)
> i386-apple-darwin8.11.1
>
> locale:
> [1] C
>
> attached base packages:
> [1] datasets utils stats graphics grDevices methods base
>
> other attached packages:
> [1] misc_0.0-11 fortunes_1.3-6 MASS_7.3-3
>
>
> ######################################################################
> Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 25 Nov 2009 - 07:49:36 GMT

This archive was generated by hypermail 2.2.0 : Wed 25 Nov 2009 - 09:50:47 GMT