Installs a package tree (or source package file), together with its dependencies.
Usage
local_install(
root = ".",
lib = .libPaths()[1],
upgrade = TRUE,
ask = interactive(),
dependencies = NA
)Arguments
- root
Path to the package tree.
- lib
Character vector of library paths to consider when creating the installation plan.
The first library path is the target where packages will be installed.
Additional library paths, if provided, are visible to the solver as candidates for satisfying dependency requirements. If a needed package is found here at an acceptable version, it won't be re-installed in
lib[1].Base and recommended packages in
.Libraryare always considered, i.e. a recommended package is only duplicated inlib[1]if a newer version is required.
- upgrade
When
FALSE, the default, pak does the minimum amount of work to give you the latest version(s) ofpkg. It will only upgrade dependent packages ifpkg, or one of their dependencies explicitly require a higher version than what you currently have. It will also prefer a binary package over to source package, even if the binary package is older.When
upgrade = TRUE, pak will ensure that you have the latest version(s) ofpkgand all their dependencies.- ask
Whether to ask for confirmation when installing a different version of a package that is already installed. Installations that only add new packages never require confirmation.
- dependencies
What kinds of dependencies to install. Most commonly one of the following values:
NA: only required (hard) dependencies,TRUE: required dependencies plus optional and development dependencies,FALSE: do not install any dependencies. (You might end up with a non-working package, and/or the installation might fail.) See Package dependency types for other possible values and more information about package dependencies.
See also
Other local package trees:
local_deps(),
local_deps_explain(),
local_install_deps(),
local_install_dev_deps(),
local_package_trees,
pak()