Re: [R] installing package help with limited permissions

From: Duncan Murdoch <>
Date: Mon 30 Oct 2006 - 22:04:53 GMT

On 10/30/2006 11:25 AM, Eva Goldwater wrote:
> Hello,
> I administer a student (Windows based) computer lab, which has R
> installed. I want to permit students to install R packages, but of
> course they don't have write permission to R root folder. Following FAQ
> suggestion, I've set up a folder that they can write to, and set the
> R_LIB parameter on the shortcut to this folder. So far, so good - they
> can now install packages. However, I have not found any way to get the
> corresponding help files installed.
> FAQ says the help files require write permission to R installation
> folder. This seems pretty extreme. Is there some subfolder that would
> do the trick? Any way to have an alternate place to store help files,
> just as we are using an alternate location for packages?
> I tried giving users Modify permission to R..../doc/html folder. With
> this, install package does NOT give any error for insufficient
> permission to install help; help(package='package_name') works; however
> help(function, package='package_name') still does not work.
> Is there any good way out of this dilemma, short of giving users free
> permission to the entire R installation? Thanks for any suggestions.

I wouldn't play with the permissions. I think you can install help pages locally, and as long as you set the library locations properly (using R_LIBS and/or .libPaths()) help should be available. The one thing you can't do on Windows is link locally installed help in with global help.

So I'd suggest settling on a particular location for each student to put his or her library, e.g. R_lib under their home directory. Then put "R_LIBS=/path/to/R_lib" on the command line. The tricky bit might be working out what /path/to/R_lib is if it varies from student to student and you want to set it for them. This setting for the target in the shortcut seems to work for me:

"C:\Program Files\R\R-2.4.0\bin\Rgui.exe" R_LIBS="%HOMEDRIVE%%HOMEPATH%/R_libs"

You can run .libPaths() to check after you start, and Sys.getenv("R_LIBS") to see what you were asking for. If the R_libs directory doesn't exist, then you won't see it in .libPaths.

Duncan Murdoch mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue Oct 31 12:46:26 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 31 Oct 2006 - 02:30:15 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.