Install a local development package.
R CMD INSTALL to install the package. Will also try to install
dependencies of the package from CRAN, if they're not already installed.
install(pkg = ".", reload = TRUE, quick = FALSE, local = TRUE, args = getOption("devtools.install.args"), quiet = FALSE, dependencies = NA, upgrade_dependencies = TRUE, build_vignettes = FALSE, keep_source = getOption("keep.source.pkgs"), threads = getOption("Ncpus", 1), force_deps = FALSE, metadata = remote_metadata(as.package(pkg)), ...)
- package description, can be path or package name. See
as.packagefor more information
TRUE(the default), will automatically reload the package after installing.
TRUEskips docs, multiple-architectures, demos, and vignettes, to make installation as fast as possible.
builds the package first: this ensures that the installation is completely clean, and prevents any binary artefacts (like
.so) from appearing in your local
- An optional character vector of additional command line
arguments to be passed to
R CMD install. This defaults to the value of the option
TRUEsuppresses output from this function.
logicalindicating to also install uninstalled packages which this
pkgdepends on/links to/suggests. See argument
TRUE, the default, will also update any out of date dependencies.
TRUE, will build vignettes. Normally it is
buildthat's responsible for creating vignettes; this argument makes sure vignettes are built even if a build never happens (i.e. because
local = TRUE).
TRUEwill keep the srcrefs from an installed package. This is useful for debugging (especially inside of RStudio). It defaults to the option
- number of concurrent threads to use for installing
It defaults to the option
- whether to force installation of dependencies even if their SHA1 reference hasn't changed from the currently installed version.
- Named list of metadata entries to be added to the
- additional arguments passed to
install.packageswhen installing dependencies.
pkgis installed with
R CMD INSTALL.
By default, installation takes place using the current package directory.
If you have compiled code, this means that artefacts of compilation will be
created in the
src/ directory. If you want to avoid this, you can
local = FALSE to first build a package bundle and then install
it from a temporary directory. This is slower, but keeps the source
If the package is loaded, it will be reloaded after installation. This is
not always completely possible, see
reload for caveats.
To install a package in a non-default library, use
with_debug to install packages with debugging flags