UserLibrary
A library for personally-installed packages

Description

Gets the name of the directory to use for packages intended for personal use only.

Usage

UserLibrary(create = FALSE)

Arguments

create A logical value. If TRUE, and none of the directories listed in Sys.getenv("TERR_LIBS_USER") exists, then UserLibrary attempts to create a directory with the name of the first directory in the list. (UserLibrary does not report a warning or error if the directory cannot be created.) The default is FALSE.

Details

The environment variable "TERR_LIBS_USER" is expected to list names of libraries (directories containing Spotfire Enterprise Runtime for R packages). On Windows computers, the library names are separated by semicolons. On Linux computers, the library names are separated by colons.
When Spotfire Enterprise Runtime for R loads these libraries, if they exist, they are placed at the start of the library search list set by the .libPaths function.
If the user does not set the environment variable "TERR_LIBS_USER" before starting Spotfire Enterprise Runtime for R, then Spotfire Enterprise Runtime for R sets the environment variable value to a directory under the directory $HOME/TERR, whose name includes the platform name and version number. If the user wants to use a non-standard location, we recommend that the location name include the platform and version number, because packages often depend on that information.
UserLibrary provides a convenient way to get the names of those libraries after Spotfire Enterprise Runtime for R starts, so a user can create a library and put it on the library search path.
Value
returns a character vector of the directories listed in Sys.getenv("TERR_LIBS_USER"), regardless of whether the directories exist.
See Also
.libPaths, Startup.
Examples
UserLibrary()
Package terrUtils version 6.1.1-7
Package Index