\HeaderA{installed.packages}{Find Installed Packages}{installed.packages}
\keyword{utilities}{installed.packages}
\begin{Description}\relax
Find details of all packages installed in the specified libraries.
\end{Description}
\begin{Usage}
\begin{verbatim}
installed.packages(lib.loc = NULL, priority = NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{lib.loc}] character vector describing the location of \R{} library trees to
search through.

\item[\code{priority}] character vector or \code{NULL} (default).  If non-null, used to
select packages; \code{"high"} is equivalent to
\code{c("base","recommended")}.  To select all packages without an
assigned priority use \code{priority = "NA"}.

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{installed.packages} scans the \file{DESCRIPTION} files of each
package found along \code{lib.loc} and returns a matrix of package
names, library paths and version numbers.

\strong{Note:} this works with package names, not bundle names.
\end{Details}
\begin{Value}
A matrix with one row per package, row names the package names and
column names \code{"Package"}, \code{"LibPath"}, \code{"Version"},
\code{"Priority"}, \code{"Bundle"}, \code{"Contains"}, \code{"Depends"},
\code{"Suggests"}, \code{"Imports"} and \code{"Built"}
(the \R{} version the package was built under).
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{update.packages}{update.packages}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
str(ip <- installed.packages(priority = "high"))
ip[, c(1,3:5)]
\end{ExampleCode}
\end{Examples}

