Learn R Programming

pak (version 0.3.1)

pkg_download: Download a package and potentially its dependencies as well

Description

Download a package and potentially its dependencies as well

Usage

pkg_download(
  pkg,
  dest_dir = ".",
  dependencies = FALSE,
  platforms = NULL,
  r_versions = NULL
)

Value

Data frame with information about the downloaded packages, invisibly.

Arguments

pkg

Package names or remote package specifications to download.

dest_dir

Destination directory for the packages. If it does not exist, then it will be created.

dependencies

Dependency types, to download the (recursive) dependencies of pkg as well. See pkgdepends::as_pkg_dependencies() for possible values.

platforms

Types of binary or source packages to download. The default is the value of pkgdepends::default_platforms().

r_versions

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.

See Also

Other package functions: lib_status(), pak_package_sources, pak(), pkg_deps_tree(), pkg_deps(), pkg_install(), pkg_remove(), pkg_status()

Examples

Run this code
if (FALSE) {
pkg_download("forcats")
pkg_download("r-lib/pak", platforms = "source")
}

Run the code above in your browser using DataLab