\HeaderA{dependsOnPkgs}{Find Reverse Dependencies}{dependsOnPkgs}
\keyword{utilities}{dependsOnPkgs}
\begin{Description}\relax
Find \sQuote{reverse} dependencies of packages, that is those packages
which depend on this one, and (optionally) so on recursively.
\end{Description}
\begin{Usage}
\begin{verbatim}
dependsOnPkgs(pkgs, dependencies = c("Depends", "Imports"),
              recursive = TRUE, lib.loc = NULL,
              installed = installed.packages(lib.loc, fields = "Enhances"))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{pkgs}] a character vector of package names.
\item[\code{dependencies}] a character vector listing the types of
dependencies, a subset of \code{c("Depends", "Imports", "Suggests",
      "Enhances")}.
\item[\code{recursive}] logical: should reverse dependencies of reverse
dependencies (and so on) be included?
\item[\code{lib.loc}] a character vector of \R{} library trees, or \code{NULL}
for all known trees (see \code{\LinkA{.libPaths}{.libPaths}}).
\item[\code{installed}] a result of calling \code{\LinkA{installed.packages}{installed.packages}}.
\end{ldescription}
\end{Arguments}
\begin{Value}
A character vector of package names, which does not include any from
\code{pkgs}.
\end{Value}
\begin{Examples}
\begin{ExampleCode}
## there are few dependencies in a vanilla R installation
dependsOnPkgs("lattice")
\end{ExampleCode}
\end{Examples}

