[R] Remove site path from .libPaths
Rainer M Krug
r.m.krug at gmail.com
Fri Feb 15 15:28:05 CET 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
I am sure I am missing something really basic, but I can't figure it out.
I want to start R so that I can specify the location for the Library tree. In principel simple:
As I only want it dependent on the directory I stat R in, I put a .Rprofile file in the directory.
My default path is:
> .libPaths()
[1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15"
[2] "/usr/lib/R/site-library"
[3] "/usr/lib/R/library"
>
But I want to have it
> .libPaths()
[1] "/home/rkrug/THE_DIRECTORY/library"
[2] "/usr/lib/R/library"
>
The first part is easy:
.libPaths("/home/rkrug/THE_DIRECTORY/library")
but how can I remove the site library?
If I set
In R 15.2 under Ubuntu, started with
R --vanilla
> .libPaths()
[1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15"
[2] "/usr/lib/R/site-library"
[3] "/usr/lib/R/library"
> .Library.site
[1] "/usr/lib/R/site-library" "/usr/lib/R/library"
> .Library
[1] "/usr/lib/R/library"
> .Library.site <- "" .Library.site
[1] ""
> .libPaths()
[1] "/home/rkrug/R/i686-pc-linux-gnu-library/2.15"
[2] "/usr/lib/R/site-library"
[3] "/usr/lib/R/library"
> .libPaths("") .libPaths()
[1] "/usr/lib/R/site-library" "/usr/lib/R/library"
> .Library
[1] "/usr/lib/R/library"
> .Library.site
[1] ""
>
> .libPaths("") .libPaths()
[1] "/usr/lib/R/site-library" "/usr/lib/R/library"
>
even executing
> .libPaths(.libPaths())
does not change anything.
Am I missing something or is there a bug in .libPaths()?
Cheers,
Rainer
- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.
(Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: Rainer at krugs.de
Skype: RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJRHkX0AAoJENvXNx4PUvmCgDYH/jwOadmO1cpPAK2yNaCfldjm
gzQ4wLf6o846xM8UQj78rIczvlycLqJP84jZe8kf8iHItFKSQbekpzujazIVEpcV
TCcaiLbm9ex5qpnRVAH8VOph59acsnEjo67dztmBl+uPb30l4hmG/dwgUeJE7HrP
oy+jtJZVostGzSiKV8wXv9C4Ohu9WWQ3Rw7VEGRKsAWcDfHGl79isEA5+ONbJjdz
32erpXBbCquJPFV4OGT7DqI8D/xh8dTVNK9ew/cdUjXlCysGAHUEQXRX2z+oxcJ5
OIwNzCADjgM1/yIc5hCtTZtFIvFWo169vTgM2/0UDnpneJLHCrHFvuU94eo/6cI=
=pJ7s
-----END PGP SIGNATURE-----
More information about the R-help
mailing list