Uses 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, build = !quick, args = getOption("devtools.install.args"), quiet = FALSE, dependencies = NA, upgrade = "ask", build_vignettes = FALSE, keep_source = getOption("keep.source.pkgs"), force = FALSE, ...)
pkg | The package to use, can be a file path to the package or a
package object. See |
---|---|
reload | if |
quick | if |
build | if |
args | An optional character vector of additional command line
arguments to be passed to |
quiet | If |
dependencies | Which dependencies do you want to check? Can be a character vector (selecting from "Depends", "Imports", "LinkingTo", "Suggests", or "Enhances"), or a logical vector.
|
upgrade | One of "default", "ask", "always", or "never". "default"
respects the value of the |
build_vignettes | if |
keep_source | If |
force | Force installation, even if the remote state has not changed since the previous install. |
... | additional arguments passed to |
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
use build = TRUE
to first build a package bundle and then install
it from a temporary directory. This is slower, but keeps the source
directory pristine.
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 withr::with_libpaths()
.
update_packages()
to update installed packages from the
source location and with_debug()
to install packages with
debugging flags set.
Other package installation: uninstall