getDepList {tools} | R Documentation |
These functions retrieve information about the dependencies of
a package or a dependency matrix, resulting in a DependsList
object.
Given a dependency matrix, getDepList()
creates a
DependsList
object for that package. That object includes the
dependencies for that matrix, which ones are installed, which
unresolved dependencies were found online, which unresolved
dependencies were not found online, and any R dependencies.
pkgDepends()
for convenience takes a package name, builds a
dependency matrix and then returns a corresponding getDepList()
.
getDepList(depMtrx, instPkgs, recursive = TRUE, local = TRUE, reduce = TRUE, lib.loc = NULL) pkgDepends(pkg, recursive = TRUE, local = TRUE, reduce = TRUE, lib.loc = NULL)
depMtrx |
a dependency matrix as from |
pkg |
the name of the package |
instPkgs |
a matrix specifying all packages installed on the
local system, as from |
recursive |
whether or not to include indirect dependencies. |
local |
whether or not to search only locally |
reduce |
whether or not to collapse all sets of dependencies to a minimal value |
lib.loc |
what libraries to use when looking for installed
packages. |
The convenience function pkgDepends(pkg)
queries
installed.packages
and generates a dependency
matrix, calling getDepList
with this information and returning
the result.
If recursive
is TRUE
, any package that is specified as a
dependency will in turn have its dependencies included (and so on),
these are known as indirect dependencies. If recursive
is
FALSE
, only the dependencies directly stated by the package will
be used.
If local
is TRUE
, the system will only look at the user's local
install and not online to find unresolved dependencies.
If reduce
is TRUE
, the system will collapse the fields in the
DependsList
object such that a minimal set of dependencies
are specified (for instance if there was
foo, foo (>= 1.0.0), foo (>= 1.3.0), it would only return
foo (>= 1.3.0)).
An object of S3 class "DependsList"
, which is a list
with components
Depends |
A vector of the dependencies for this package. |
Installed |
A vector of the dependencies which have been satisfied by the currently installed packages. |
Found |
A list representing the dependencies which are not in
|
NotFound |
... |
R |
Any R version dependencies. |
Jeff Gentry
pkgDepends("tools", local = FALSE)