Skip to content

help files for libraries that aren't in the defaults library tree

2 messages · Martin Maechler, Thomas Lumley

#
J> Hello, I created a library for a bunch of functions that I use
    J> frequently so that I dont have to carry duplicate copies around to
    J> wherever I fire up an R sesssion.  However, I have problems locating
    J> the help files for those functions.  Here are some details.

    J> I created the library "myR" and installed this in /home/royle/R
    J> using:

    J> R INSTALL -l /home/royle/R /home/royle/Rpackages/myR

    J> This went well, and I can access all of those functions in the usual
    J> way....i.e. like:

    J>  library(myR,lib.loc="/home/royle/R/")


    J> But, I found that to get the help files I have to type:

    J>  help(interp,lib.loc="/home/royle/R/")

    J> and so it is kind of a pain .....
	.........

    J> The question: is there a way to make these help files accessible
    J> when installed in a something other than the default library tree
    J> _without_ using the lib.loc option in help?

    J> Possible solution: It seems to me that I could add my new library
    J> tree to .lib.loc but wouldn't I have to create a new .lib.loc in
    J> every R session?

The online help [?.lib.loc  or ?library ..]
gives the solution:
So,

1) in a  [t]csh environment, you'd write in your  ~/.login

	setenv RLIBS /home/royle/R

2) in  [ba|k]sh	environment, you'd have in your ~/.profile

	RLIBS=/home/royle/R  export RLIBS

---
Martin





-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Tue, 1 Dec 1998, Martin Maechler wrote:

            
Also, as a general Unix security note, you wouldn't need to be root to
write to the R library tree. A safer alternative is to make that directory
owned by a special user or group, so that selected people can be given the
power to install R libraries but not necessarily to destroy the entire
file system.

	-thomas


Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._