Functions to Retrieve Dependency Information
Given a dependency matrix, will create a
DependsList object for that
package which will include 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.
getDepList(depMtrx, instPkgs, recursive = TRUE, local = TRUE, reduce = TRUE, lib.loc = NULL)pkgDepends(pkg, recursive = TRUE, local = TRUE, reduce = TRUE, lib.loc = NULL)
- A dependency matrix as from
- The name of the package
- A matrix specifying all packages installed on the
local system, as from
- Whether or not to include indirect dependencies
- Whether or not to search only locally
- Whether or not to collapse all sets of dependencies to a minimal value
- What libraries to use when looking for installed
NULLindicates all library directories in the user's
pkgDepends is a convenience function which wraps
getDepList and takes as input a package name. It will then
and also generate a dependency
getDepList with this information and returning
These functions will retrieve information about the dependencies of
the matrix, resulting in a
DependsList object. This is a
list with four elements:
- A vector of the dependencies for this package.
Installedbut were found online. This list has element names which are the URLs for the repositories in which packages were found and the elements themselves are vectors of package names which were found in the respective repositories. If
local = TRUE, the
Foundelement will always be empty.
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
FALSE, only the dependencies directly stated by the package will
TRUE, the system will only look at the user's local
install and not online to find unresolved dependencies.
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 class
pkgDepends("tools", local = FALSE)