Download a package and potentially its dependencies as well
pkg_download(
pkg,
dest_dir = ".",
dependencies = FALSE,
platforms = NULL,
r_versions = NULL
)
Package names or remote package specifications to download.
Destination directory for the packages. If it does not exist, then it will be created.
Dependency types, to download the (recursive)
dependencies of pkg
as well. See pkgdepends::as_pkg_dependencies()
for possible values.
Types of binary or source packages to download. The
default is the value of pkgdepends::default_platforms()
.
R version(s) to download packages for. (This does not matter for source packages, but it does for binaries.) It defaults to the current R version.
Data frame with information about the downloaded packages, invisibly.
Other package functions:
lib_status()
,
pak_package_sources
,
pak()
,
pkg_deps_tree()
,
pkg_deps()
,
pkg_install()
,
pkg_remove()
,
pkg_status()
if (FALSE) {
pkg_download("forcats")
pkg_download("r-lib/pak", platforms = "source")
}