lib_paths {librarian} | R Documentation |
Changing and viewing the package search paths
Description
View and edit the list of folders that R will look inside when trying to find a package. Add an existing folder, create and add a new folder, or shuffle a folder to the front of the list so that it is used as the default installation location for new packages in the current session.
Usage
lib_paths(path, make_path = TRUE, ask = TRUE)
Arguments
path |
(Character, or omit) A path to add to the library search path. Can be an
absolute or relative path. If |
make_path |
(Logical) If |
ask |
(Logical) If |
Value
A character vector of the folders on the library search path. If path
was not
omitted, it will be the first element.
Examples
lib_paths()
#> [1] "D:/R/R-3.5.2/library"
lib_paths(file.path(tempdir(), "newlibraryfolder"), ask = FALSE)
#> [1] "C:/Users/.../Temp/Rtmp0Qbvgo/newlibraryfolder"
#> [2] "D:/R/R-3.5.2/library"