[R-pkg-devel] Issue with nlme-package on Windows
On 26/02/2016 4:32 AM, Daniel L?decke wrote:
I have an issue with the nlme-package on Windows, where the package update is installed into my user folder (because the Program Files folder is write protected resp. access only for admins), while the nlme-package version that come along with the R installation is still in my Program Files directory. So I have two nlme-versions: 3.1-122 in my R-installation folder, and 3.1-124 in my Documents folder. I recognized this because my package does not install when running R CMD check. The log states that ?nlme 3.1-122 is being loaded, but nlme 3.1-124 is required?. I then saw that both nlme-versions are installed. Is this a Windows-, R- or nlme-issue? When installing R on Windows, I?m being asked to choose a library-folder because ?Program Files? is write protected?
It's a user-issue. You need to tell R to use your user folder as a library upon startup. Since installing and checking of packages is done in a separate R process, you would do this by setting an environment variable. Quoting Brian Ripley recently in R-devel:
Set R_LIBS to change the library path for new sessions: see ?.libPath .
Duncan Murdoch