Christoph Scherber
2011-Aug-19 11:32 UTC
[R] Windows 7 issues with installing packages and setting library paths
Dear all, I am forced to work in an environment without administrator rights. When using R2.13.1 on Windows 7 (64-Bit), I found that I can?t install or update any packages due to missing writing permissions. I managed to get full access to a directory on my C:\ drive now - but how do I specify that all libraries shall be installed into this directory? In Rcmd_environ I have the following entries: ## from R.sh R_SHARE_DIR="C:\\Program Files\\R\\R-2.13.1\share" R_INCLUDE_DIR="C:\\Program Files\\R\\R-2.13.1\share\include" R_DOC_DIR="C:\\Program Files\\R\\R-2.13.1\share\doc" R_ARCHR_LIBS_USER="C:\\Program Files\\R\\R-2.13.1\\library" R_LIBS="C:\\Program Files\\R\\R-2.13.1\\library" In Rprofile.site I have the following entries: .Library.site="C:\\Program Files\\R\\R-2.13.1\\library" .Library="C:\\Program Files\\R\\R-2.13.1\\library" .libPaths="C:\\Program Files\\R\\R-2.13.1\\library" What else do I need to change? When I start up R, I get the following error message: Error: cannot change value of locked binding for '.Library' When calling .libPaths, I still get the wrong path: "\\\\winfs-uni.top.gwdg.de/cscherb1$/R/R-2.13.1/library" R has been installed at "C:\\Program Files\\R" but for some reason it still uses "winfs-uni.top.gwdg.de/cscherb1$/R" as the default directory for libraries (where I don?t have write permissions for some unknown reasons) What can I do to change the default library installation location? Any help would be greatly appreciated! Many thanks and best wishes Christoph -- Dr. rer.nat. Christoph Scherber University of Goettingen DNPW, Agroecology Grisebachstr. 6 D-37077 Goettingen Germany phone +49 (0)551 39 8807 fax +49 (0)551 39 8806 Homepage http://www.gwdg.de/~cscherb1
Uwe Ligges
2011-Aug-19 20:19 UTC
[R] Windows 7 issues with installing packages and setting library paths
On 19.08.2011 13:32, Christoph Scherber wrote:> Dear all, > > I am forced to work in an environment without administrator rights.>> When using R2.13.1 on Windows 7 (64-Bit), I found that I can?t install or update any packages due to missing writing permissions. > > I managed to get full access to a directory on my C:\ drive now - but how do I specify that all libraries shall be installed into this directory? > > In Rcmd_environ I have the following entries: > ## from R.sh > R_SHARE_DIR="C:\\Program Files\\R\\R-2.13.1\share" > R_INCLUDE_DIR="C:\\Program Files\\R\\R-2.13.1\share\include" > R_DOC_DIR="C:\\Program Files\\R\\R-2.13.1\share\doc" > R_ARCH> R_LIBS_USER="C:\\Program Files\\R\\R-2.13.1\\library" > R_LIBS="C:\\Program Files\\R\\R-2.13.1\\library" > > > In Rprofile.site I have the following entries: > > .Library.site="C:\\Program Files\\R\\R-2.13.1\\library" > .Library="C:\\Program Files\\R\\R-2.13.1\\library" > .libPaths="C:\\Program Files\\R\\R-2.13.1\\library"Forget about anything your wrote above and delete what you entered. A clean installation should provide you with a personal library for packages anyway. If that is not the case, you can also set an environment variable R_LIBS_USER whjere you can point to any directory (=library) where you'd like to install packages. See ?Startup and ?.libPaths and of course the R Installation and Administration manual for more help. Best, Uwe Ligges> What else do I need to change? > > When I start up R, I get the following error message: > > Error: cannot change value of locked binding for '.Library' > > When calling .libPaths, I still get the wrong path: > "\\\\winfs-uni.top.gwdg.de/cscherb1$/R/R-2.13.1/library" > > > R has been installed at > "C:\\Program Files\\R" > > but for some reason it still uses > "winfs-uni.top.gwdg.de/cscherb1$/R" > > as the default directory for libraries (where I don?t have write permissions for some unknown reasons) > > What can I do to change the default library installation location? > > Any help would be greatly appreciated! > > Many thanks and best wishes > Christoph > > > > > > > > > ______________________________________________ > 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.