.find.package(package=NULL, lib.loc=NULL, quiet=FALSE, verbose=FALSE) .path.package(package=NULL, quiet=FALSE, verbose=FALSE) .lib.loc(lib.loc=NULL, default.dirs=c("local/library", "library", "module")) .libPaths(new)
lib.loc
from
getenv("S_LIBS")
to set the list of locations where library sections (or packages) may be installed.
.libPaths
is called with a value
for the
new
argument, then the value of
the variable
lib.loc
that is stored in database 0
will be modifed.
The
lib.loc
variable is used by functions
library() and system.file().
.find.package
returns a character vector
containing the paths to specified packages (libraries). The packages do
not have to be attached. If the argument
packages
is NULL, then the vector contains all packages in known library and module
directories.
.path.package
returns a character vector
containing the paths to specified packages (libraries) for the packages
that are attached. If the argument
packages
is NULL, then the vector contains all packages that are attached.
.find.package
and
.path.package
emulate R functions of the same name.
.libPaths
returns a vector of directory names, and if
new
is supplied, it adds that directory to the
list of places to look for libraries when using library() or system.file().
This function is similar to R's version, but R uses the
variable
.Library
instead of
lib.loc
. See SIDE EFFECTS.
.lib.loc
returns a character vector containing
full paths to directories containing packages (libraries). The following
values are combined to create the return value:
the
lib.loc
argument,
the current setting of the variable
lib.loc
from database 0, and the default S-PLUS library and module directories.
This function is not in R.
# add another directory to those searched for packages .libPaths("/homes/mc/my_packages") # list directories that will be searched by library() get("lib.loc",where=0)
# list full paths to all attached packages (libraries) .path.package()