Rev 39096 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{libPaths}\title{Search Paths for Packages}\alias{.Library}\alias{.libPaths}\description{\code{.libPaths} gets/sets the library trees within which packages arelooked for.}\usage{.libPaths(new).Library}\arguments{\item{new}{a character vector with the locations of \R library trees.}}\details{\code{.Library} is a character string giving the location of thedefault library, the \file{library} subdirectory of \env{R\_HOME}.\code{.libPaths} is used for getting or setting the library trees that\R knows about (and hence uses when looking for packages). If calledwith argument \code{new}, the library search path is set tothe existing files in \code{unique(c(new, .Library))} and this isreturned. If given no argument, a character vector with the currentlyknown library trees is returned.#ifdef unixThe library search path is initialized at startup from the environmentvariable \env{R\_LIBS} (which should be a colon-separated list ofdirectories at which \R library trees are rooted) by calling\code{.libPaths} with the directories specified in \env{R\_LIBS}.#endif#ifdef windowsThe library search path is initialized at startup from the environmentvariable \env{R\_LIBS} (which should be a semicolon-separated list ofdirectories at which \R library trees are rooted) by calling\code{.libPaths} with the directories specified in \env{R\_LIBS}.#endifFunction \code{.libPaths} always uses the value of \code{.Library} inthe base namespace.}\value{A character vector of file paths.}\references{Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)\emph{The New S Language}.Wadsworth \& Brooks/Cole.}\seealso{\code{\link{library}}}\examples{.libPaths() # all library trees R knows about}\keyword{data}