EVOLUTION-MANAGER
Edit File: file.edit.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: Edit One or More 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 file.edit {utils}"><tr><td>file.edit {utils}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Edit One or More Files</h2> <h3>Description</h3> <p>Edit one or more files in a text editor.</p> <h3>Usage</h3> <pre> file.edit(..., title = file, editor = getOption("editor"), fileEncoding = "") </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>...</code></td> <td> <p>one or more character vectors containing the names of the files to be displayed. These will be tilde-expanded: see <code><a href="../../base/html/path.expand.html">path.expand</a></code>.</p> </td></tr> <tr valign="top"><td><code>title</code></td> <td> <p>the title to use in the editor; defaults to the filename.</p> </td></tr> <tr valign="top"><td><code>editor</code></td> <td> <p>the text editor to be used, usually as a character string naming (or giving the path to) the text editor you want to use See ‘Details’.</p> </td></tr> <tr valign="top"><td><code>fileEncoding</code></td> <td> <p>the encoding to assume for the file: the default is to assume the native encoding. See the ‘Encoding’ section of the help for <code><a href="../../base/html/connections.html">file</a></code>.</p> </td></tr> </table> <h3>Details</h3> <p>The behaviour of this function is very system-dependent. Currently files can be opened only one at a time on Unix; on Windows, the internal editor allows multiple files to be opened, but has a limit of 50 simultaneous edit windows. </p> <p>The <code>title</code> argument is used for the window caption in Windows, and is currently ignored on other platforms. </p> <p>Any error in re-encoding the files to the native encoding will cause the function to fail. </p> <p>The default for <code>editor</code> is system-dependent. On Windows it defaults to <code>"internal"</code>, the script editor, and in the macOS GUI the document editor is used whatever the value of <code>editor</code>. On Unix the default is set from the environment variables <span class="env">EDITOR</span> or <span class="env">VISUAL</span> if either is set, otherwise <code>vi</code> is used. </p> <p><code>editor</code> can also be an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> function, in which case it is called with the arguments <code>name</code>, <code>file</code>, and <code>title</code>. Note that such a function will need to independently implement all desired functionality. </p> <p>On Windows, UTF-8-encoded paths not valid in the current locale can be used. </p> <h3>See Also</h3> <p><code><a href="../../base/html/files.html">files</a></code>, <code><a href="../../base/html/file.show.html">file.show</a></code>, <code><a href="edit.html">edit</a></code>, <code><a href="fix.html">fix</a></code>, </p> <h3>Examples</h3> <pre> ## Not run: # open two R scripts for editing file.edit("script1.R", "script2.R") ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>utils</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>