EVOLUTION-MANAGER
Edit File: file.path.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: Construct Path to File</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 file.path {base}"><tr><td>file.path {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Construct Path to File</h2> <h3>Description</h3> <p>Construct the path to a file from components in a platform-independent way. </p> <h3>Usage</h3> <pre> file.path(..., fsep = .Platform$file.sep) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>...</code></td> <td> <p>character vectors.</p> </td></tr> <tr valign="top"><td><code>fsep</code></td> <td> <p>the path separator to use.</p> </td></tr> </table> <h3>Details</h3> <p>The implementation is designed to be fast (faster than <code><a href="paste.html">paste</a></code>) as this function is used extensively in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> itself. </p> <p>It can also be used for environment paths such as <span class="env">PATH</span> and <span class="env">R_LIBS</span> with <code>fsep = .Platform$path.sep</code>. </p> <p>Trailing path separators are invalid for Windows file paths apart from ‘<span class="file">/</span>’ and ‘<span class="file">d:/</span>’ (although some functions/utilities do accept them), so a trailing <code>/</code> or <code>\</code> is removed. </p> <h3>Value</h3> <p>A character vector of the arguments concatenated term-by-term and separated by <code>fsep</code> if all arguments have positive length; otherwise, an empty character vector (unlike <code><a href="paste.html">paste</a></code>). </p> <h3>Note</h3> <p>The components are by default separated by <code>/</code> (not <code>\</code>) on Windows. </p> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>