Learn R Programming

packrat (version 0.9.2)

packrat-resources: Paths to Packrat Resources

Description

These functions provide a mechanism for retrieving the paths to Packrat resource directories. Each of these directories can be overridden by setting either an environment variable, or an R option.

Usage

project_dir(project = NULL)

src_dir(project = NULL)

lib_dir(project = NULL)

bundles_dir(project = NULL)

Arguments

project

The project directory.

Project Directory

project_dir() is special -- the R_PACKRAT_PROJECT_DIR environment variable is set and unset by on and off, respectively, and generally should not be overridden by the user.

Directory Resolution

The following table shows the order in which resource directories are discovered (from left to right). The first non-empty result is used.

APIEnvironment VariableR OptionDefault Value
project_dir()R_PACKRAT_PROJECT_DIRpackrat.project.dirgetwd()
src_dir()R_PACKRAT_SRC_DIRpackrat.src.dir"packrat/src"
lib_dir()R_PACKRAT_LIB_DIRpackrat.lib.dir"packrat/lib"
bundles_dir()R_PACKRAT_BUNDLES_DIRpackrat.bundles.dir"packrat/bundles"
(none)R_PACKRAT_LIB_R_DIRpackrat.lib-r.dir"packrat/lib-R"
(none)R_PACKRAT_LIB_EXT_DIRpackrat.lib-ext.dir"packrat/lib-ext"