Collect information about dependencies of R packages, recursively.
Details
pkg_deps
, pkg_download_proposal
and pkg_installation_proposal
all resolve their dependencies recursively, to obtain information about
all packages needed for the specified package references.
CRAN and Bioconductor packages
Resolution currently start by downloading the CRAN and Bioconductor metadata, if it is out of date. For CRAN, we also download additional metadata, that includes file sizes, SHA hashes, system requirements, and "built" (for binary packages) and "packaged" time stamps. The extra meta information is updated daily currently, so for some packages it might be incorrect or missing.
GitHub packages
For GitHub packages, we query their download URL to be able to
download the package later, and also download their DESCRIPTION
file, to learn about their dependencies.
Local packages
From local package files we extract the DESCRIPTION
file, to learn
about their dependencies.
The remotes
field in DESCRIPTION
We support the non-standard Remotes
field in the package DESCRIPTION
file. This field may contain a list of package references for any of the
dependencies that are specified in one of the Depends
, Includes
,
Suggests
or Enhances
fields. The syntax is a comma separated list of
package references.
The result
The result of the resolution is a data frame with lots of information about the packages and their dependencies. The columns that are not documented here may be removed or changed, because they are either used internally or experimental.
built
: TheBuilt
field from theDESCRIPTION
file of binary packages, for which this information is available.cache_status
: Whether the package file is in the package cache. It isNA
forinstalled::
package refs.dep_types
: Character vector of dependency types that were considered for this package. (This is a list column.)deps
: Dependencies of the package, in a data frame. See 'Package dependency tables' below.direct
: Whether this package (ref, really) was directly specified, or added as a dependency.error
: This is a list column that contains error objects for the refs that pkgdepends failed to resolve.filesize
: The file size in bytes, orNA
if this information is not available.license
: License of the package, orNA
if not available.md5sum
: MD5 checksum of the package file, if available, orNA
if not.metadata
: A named character vector. These fields will be (should be) added to the installedDESCRIPTION
file of the package.mirror
: URL of the CRAN(-like) mirror site where the metadata was obtained from. It is NA for non-CRAN-like sources, e.g. local files, installed packages, GitHub, etc.needscompilation
: Whether the package needs compilation.package
: Package name.priority
: This is"base"
for base packages,"recommended"
for recommended packages, andNA
otherwise.ref
: Package reference.remote
: The parsedremote_ref
objects, seeparse_pkg_refs()
. This is a list column.repodir
: The directory where this package should be in a CRAN-like repository.sha256
: SHA256 hash of the package file, if available, otherwiseNA
.sources
: URLs where this package can be downloaded from. This is a zero length vector forinstalled::
refs.status
: Status of the dependency resolution,"OK"
or"FAILED"
.target
: Path where this package should saved in a CRAN-repository.type
: Ref type.version
: Package version.