EVOLUTION-MANAGER
Edit File: system.file.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 Names of R System Files</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 system.file {base}"><tr><td>system.file {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Find Names of R System Files</h2> <h3>Description</h3> <p>Finds the full file names of files in packages etc. </p> <h3>Usage</h3> <pre> system.file(..., package = "base", lib.loc = NULL, mustWork = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>...</code></td> <td> <p>character vectors, specifying subdirectory and file(s) within some package. The default, none, returns the root of the package. Wildcards are not supported.</p> </td></tr> <tr valign="top"><td><code>package</code></td> <td> <p>a character string with the name of a single package. An error occurs if more than one package name is given.</p> </td></tr> <tr valign="top"><td><code>lib.loc</code></td> <td> <p>a character vector with path names of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> libraries. See ‘Details’ for the meaning of the default value of <code>NULL</code>.</p> </td></tr> <tr valign="top"><td><code>mustWork</code></td> <td> <p>logical. If <code>TRUE</code>, an error is given if there are no matching files.</p> </td></tr> </table> <h3>Details</h3> <p>This checks the existence of the specified files with <code><a href="files.html">file.exists</a></code>. So file paths are only returned if there are sufficient permissions to establish their existence. </p> <p>The unnamed arguments in <code>...</code> are usually character strings, but if character vectors they are recycled to the same length. </p> <p>This uses <code><a href="find.package.html">find.package</a></code> to find the package, and hence with the default <code>lib.loc = NULL</code> looks first for attached packages then in each library listed in <code><a href="libPaths.html">.libPaths</a>()</code>. Note that if a namespace is loaded but the package is not attached, this will look only on <code><a href="libPaths.html">.libPaths</a>()</code>. </p> <h3>Value</h3> <p>A character vector of positive length, containing the file paths that matched <code>...</code>, or the empty string, <code>""</code>, if none matched (unless <code>mustWork = TRUE</code>). </p> <p>If matching the root of a package, there is no trailing separator. </p> <p><code>system.file()</code> with no arguments gives the root of the <span class="pkg">base</span> package. </p> <h3>See Also</h3> <p><code><a href="Rhome.html">R.home</a></code> for the root directory of the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> installation, <code><a href="list.files.html">list.files</a></code>. </p> <p><code><a href="Sys.glob.html">Sys.glob</a></code> to find paths via wildcards. </p> <h3>Examples</h3> <pre> system.file() # The root of the 'base' package system.file(package = "stats") # The root of package 'stats' system.file("INDEX") system.file("help", "AnIndex", 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>