libPaths {base}R Documentation

Search Paths for Packages

Description

.libPaths gets/sets the library trees within which packages are looked for.

Usage

.libPaths(new)

.Library

Arguments

new a character vector with the locations of R library trees.

Details

.Library is a character string giving the location of the default library, the ‘library’ subdirectory of R_HOME.

.libPaths is used for getting or setting the library trees that R knows about (and hence uses when looking for packages). If called with argument new, the library search path is set to the existing files in unique(c(new, .Library)) and this is returned. If given no argument, a character vector with the currently known library trees is returned.

The library search path is initialized at startup from the environment variable R_LIBS (which should be aapplying FUN to the corresponding element of X.

sapply is a “user-friendly” version of lapply by default returning a vector or matrix if appropriate.

replicate is a wrapper for the common use of sapply for repeated evaluation of an expression (which will usually involve random number generation).

Usage

lapply(X, FUN, ...)

sapply(X, FUN, ..., simplify = TRUE, USE.NAMES = TRUE)

replicate(n, expr, simplify = TRUE)

Arguments

X a vector (atomic or list) or an expressions vector. Other objects (including