[R] How to reset libPaths for root
Juergen Rose
rose at rz.uni-potsdam.de
Thu Feb 10 21:09:45 CET 2011
High,
on all of my computers the first entry in libPaths for root
was /usr/lib64/R/library or /usr/lib/R/library. Now it change at one
(lynx) anyway to
root at lynx:/root(2)# R
R version 2.12.1 (2010-12-16)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> .libPaths()
[1] "/root/R/x86_64-pc-linux-gnu-library/2.12"
[2] "/usr/lib64/R/library"
If I try to install packages with:
install.packages(something)
it goes to /root/R/x86_64-pc-linux-gnu-library/2.12/ and not as
expected to /usr/lib64/R/library.
If I do .libPaths("/usr/lib64/R/library") I can temporarily reset
libPaths to expected value, but after the next start of R I have
again /root/R/x86_64-pc-linux-gnu-library/2.12 as first entry in
libPaths:
> .libPaths("/usr/lib64/R/library")
> .libPaths()
[1] "/usr/lib64/R/library"
>
Save workspace image? [y/n/c]: y
[1]+ Done compare_conf_files 2> /dev/null
root at lynx:/root(3)# R
R version 2.12.1 (2010-12-16)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> .libPaths()
[1] "/root/R/x86_64-pc-linux-gnu-library/2.12"
[2] "/usr/lib64/R/library"
>
How can I reset libPaths permanently for root to "/usr/lib64/R/library"?
I have:
root at lynx:/root(4)# R --version
R version 2.12.1 (2010-12-16)
..
Regards.
--
Juergen Rose <rose at rz.uni-potsdam.de>
Uni-Potsdam
More information about the R-help
mailing list