EVOLUTION-MANAGER
Edit File: zpackages.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: Listing of 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 zpackages {base}"><tr><td>zpackages {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Listing of Packages</h2> <h3>Description</h3> <p><code>.packages</code> returns information about package availability. </p> <h3>Usage</h3> <pre> .packages(all.available = FALSE, lib.loc = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>all.available</code></td> <td> <p>logical; if <code>TRUE</code> return a character vector of all available packages in <code>lib.loc</code>.</p> </td></tr> <tr valign="top"><td><code>lib.loc</code></td> <td> <p>a 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>. The default value of <code>NULL</code> corresponds to <code><a href="libPaths.html">.libPaths</a>()</code>.</p> </td></tr> </table> <h3>Details</h3> <p><code>.packages()</code> returns the names of the currently attached packages <em>invisibly</em> whereas <code>.packages(all.available = TRUE)</code> gives (visibly) <em>all</em> packages available in the library location path <code>lib.loc</code>. </p> <p>For a package to be regarded as being ‘available’ it must have valid metadata (and hence be an installed package). However, this will report a package as available if the metadata does not match the directory name: use <code><a href="find.package.html">find.package</a></code> to confirm that the metadata match or <code><a href="../../utils/html/installed.packages.html">installed.packages</a></code> for a much slower but more comprehensive check of ‘available’ packages. </p> <h3>Value</h3> <p>A character vector of package base names, invisible unless <code>all.available = TRUE</code>. </p> <h3>Note</h3> <p><code>.packages(all.available = TRUE)</code> is not a way to find out if a small number of packages are available for use: not only is it expensive when thousands of packages are installed, it is an incomplete test. See the help for <code><a href="find.package.html">find.package</a></code> for why <code><a href="library.html">require</a></code> should be used. </p> <h3>Author(s)</h3> <p>R core; Guido Masarotto for the <code>all.available = TRUE</code> part of <code>.packages</code>. </p> <h3>See Also</h3> <p><code><a href="library.html">library</a></code>, <code><a href="libPaths.html">.libPaths</a></code>, <code><a href="../../utils/html/installed.packages.html">installed.packages</a></code>. </p> <h3>Examples</h3> <pre> (.packages()) # maybe just "base" .packages(all.available = TRUE) # return all available as character vector require(splines) (.packages()) # "splines", too detach("package:splines") </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>