Collect information about dependencies of R packages, recursively.
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.
For GitHub packages, we query their download URL to be able to
download the package later, and also download their
file, to learn about their dependencies.
From local package files we extract the
DESCRIPTION file, to learn
about their dependencies.
We support the non-standard
Remotes field in the package
file. This field may contain a list of package references for any of the
dependencies that are specified in one of the
Enhances fields. The syntax is a comma separated list of
The result of the resolution is a data frame (tibble) 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 field from the
DESCRIPTION file of binary
packages, for which this information is available.
cache_status: Whether the package file is in the package cache.
installed:: 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 (tibble). 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, or
NA if this information is
license: License of the package, or
NA if not available.
md5sum: MD5 checksum of the package file, if available, or
metadata: A named character vector. These fields will be (should be)
added to the installed
DESCRIPTION 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 packages, and
ref: Package reference.
remote: The parsed
remote_ref objects, see
This is a list column.
repodir: The directory where this package should be in a CRAN-like
sha256: SHA256 hash of the package file, if available, otherwise
sources: URLs where this package can be downloaded from. This is a
zero length vector for
status: Status of the dependency resolution,
target: Path where this package should saved in a CRAN-repository.
type: Ref type.
version: Package version.
A package dependency table has five columns currently:
ref: The package ref of the dependency.
type: The dependency type, in all lowercase. I.e.
op: Operator for version requirements, e.g.
version: Version number, for version requirements.
The resolution process does not stop on error. Instead, failed
resolutions return and error object in the
error column of the result