Frank Harrell
2011-Mar-08 23:53 UTC
[R] How to enforce location of installation of downloaded packages
Using R on Linux I want to force downloaded packages to go into /usr/local/lib/R/site-library. I have an .Rprofile file in my home directory containing the following: options(help_type='html', browser='chromium-browser', repos='http://www.ibiblio.org/pub/languages/R/CRAN', lib='/usr/local/lib/R/site-library') But sometimes install.packages (with R run as superuser using sudo) will create a directory called x86... under ~/R and put installed packages there. How do I force the system to always use /usr/local/lib/...? Thanks Frank ----- Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/How-to-enforce-location-of-installation-of-downloaded-packages-tp3342495p3342495.html Sent from the R help mailing list archive at Nabble.com.
Uwe Ligges
2011-Mar-09 19:16 UTC
[R] How to enforce location of installation of downloaded packages
install.packages(...., lib='/usr/local/lib/R/site-library') otherwise you have to ensure that this library is the first one in .libPaths() and watch out that it is not changed by any of the many mechanisms that allow for adding libraries to the search path. Uwe On 09.03.2011 00:53, Frank Harrell wrote:> Using R on Linux I want to force downloaded packages to go into > /usr/local/lib/R/site-library. I have an .Rprofile file in my home > directory containing the following: > > options(help_type='html', browser='chromium-browser', > repos='http://www.ibiblio.org/pub/languages/R/CRAN', > lib='/usr/local/lib/R/site-library') > > But sometimes install.packages (with R run as superuser using sudo) will > create a directory called x86... under ~/R and put installed packages there. > How do I force the system to always use /usr/local/lib/...? > > Thanks > Frank > > > ----- > Frank Harrell > Department of Biostatistics, Vanderbilt University > -- > View this message in context: http://r.789695.n4.nabble.com/How-to-enforce-location-of-installation-of-downloaded-packages-tp3342495p3342495.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Seemingly Similar Threads
- Windows installer, HTML help, R 2.10.0
- qplot in ggplot2 not working any longer - (what did I do?)
- Error w/ Start up Script
- source file on startup question - why does an old version of a function show up? ggplot or R?
- httpd error with and help_type = 'html', package = NULL