EVOLUTION-MANAGER
Edit File: installed.packages.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Find Installed Packages</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for installed.packages {utils}"><tr><td>installed.packages {utils}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Find Installed Packages</h2> <h3>Description</h3> <p>Find (or retrieve) details of all packages installed in the specified libraries. </p> <h3>Usage</h3> <pre> installed.packages(lib.loc = NULL, priority = NULL, noCache = FALSE, fields = NULL, subarch = .Platform$r_arch, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>lib.loc</code></td> <td> <p>character vector describing the location of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> library trees to search through, or <code>NULL</code> for all known trees (see <code><a href="../../base/html/libPaths.html">.libPaths</a></code>). </p> </td></tr> <tr valign="top"><td><code>priority</code></td> <td> <p>character vector or <code>NULL</code> (default). If non-null, used to select packages; <code>"high"</code> is equivalent to <code>c("base", "recommended")</code>. To select all packages without an assigned priority use <code>priority = "NA"</code>. </p> </td></tr> <tr valign="top"><td><code>noCache</code></td> <td> <p>Do not use cached information, nor cache it.</p> </td></tr> <tr valign="top"><td><code>fields</code></td> <td> <p>a character vector giving the fields to extract from each package's <code>DESCRIPTION</code> file in addition to the default ones, or <code>NULL</code> (default). Unavailable fields result in <code>NA</code> values.</p> </td></tr> <tr valign="top"><td><code>subarch</code></td> <td> <p>character string or <code>NULL</code>. If non-null and non-empty, used to select packages which are installed for that sub-architecture.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>allows unused arguments to be passed down from other functions.</p> </td></tr> </table> <h3>Details</h3> <p><code>installed.packages</code> scans the ‘<span class="file">DESCRIPTION</span>’ files of each package found along <code>lib.loc</code> and returns a matrix of package names, library paths and version numbers. </p> <p>The information found is cached (by library) for the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> session and specified <code>fields</code> argument, and updated only if the top-level library directory has been altered, for example by installing or removing a package. If the cached information becomes confused, it can be avoided by specifying <code>noCache = TRUE</code>. </p> <h3>Value</h3> <p>A matrix with one row per package, row names the package names and column names (currently) <code>"Package"</code>, <code>"LibPath"</code>, <code>"Version"</code>, <code>"Priority"</code>, <code>"Depends"</code>, <code>"Imports"</code>, <code>"LinkingTo"</code>, <code>"Suggests"</code>, <code>"Enhances"</code>, <code>"OS_type"</code>, <code>"License"</code> and <code>"Built"</code> (the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> version the package was built under). Additional columns can be specified using the <code>fields</code> argument. </p> <h3>Note</h3> <p>This needs to read several files per installed package, which will be slow on Windows and on some network-mounted file systems. </p> <p>It will be slow when thousands of packages are installed, so do not use it to find out if a named package is installed (use <code><a href="../../base/html/find.package.html">find.package</a></code> or <code><a href="../../base/html/system.file.html">system.file</a></code>) nor to find out if a package is usable (call <code><a href="../../base/html/ns-load.html">requireNamespace</a></code> or <code><a href="../../base/html/library.html">require</a></code> and check the return value) nor to find details of a small number of packages (use <code><a href="packageDescription.html">packageDescription</a></code>). </p> <h3>See Also</h3> <p><code><a href="update.packages.html">update.packages</a></code>, <code><a href="install.packages.html">install.packages</a></code>, <code><a href="INSTALL.html">INSTALL</a></code>, <code><a href="REMOVE.html">REMOVE</a></code>. </p> <h3>Examples</h3> <pre> ## confine search to .Library for speed str(ip <- installed.packages(.Library, priority = "high")) ip[, c(1,3:5)] plic <- installed.packages(.Library, priority = "high", fields = "License") ## what licenses are there: table( plic[, "License"] ) </pre> <hr /><div style="text-align: center;">[Package <em>utils</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>