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

From: Rolf Turner <r.turner_at_auckland.ac.nz>
Date: Wed, 25 Nov 2009 10:40:53 +1300

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 Received on Tue 24 Nov 2009 - 21:44:10 GMT

This archive was generated by hypermail 2.2.0 : Wed 25 Nov 2009 - 09:10:45 GMT