EVOLUTION-MANAGER
Edit File: file.show.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: Display One or More Text 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.show {base}"><tr><td>file.show {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Display One or More Text Files</h2> <h3>Description</h3> <p>Display one or more (plain) text files, in a platform specific way, typically via a ‘pager’. </p> <h3>Usage</h3> <pre> file.show(..., header = rep("", nfiles), title = "R Information", delete.file = FALSE, pager = getOption("pager"), encoding = "") </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. Paths with have <a href="path.expand.html">tilde expansion</a>.</p> </td></tr> <tr valign="top"><td><code>header</code></td> <td> <p>character vector (of the same length as the number of files specified in <code>...</code>) giving a header for each file being displayed. Defaults to empty strings.</p> </td></tr> <tr valign="top"><td><code>title</code></td> <td> <p>an overall title for the display. If a single separate window is used for the display, <code>title</code> will be used as the window title. If multiple windows are used, their titles should combine the title and the file-specific header.</p> </td></tr> <tr valign="top"><td><code>delete.file</code></td> <td> <p>should the files be deleted after display? Used for temporary files.</p> </td></tr> <tr valign="top"><td><code>pager</code></td> <td> <p>the pager to be used: not used on all platforms</p> </td></tr> <tr valign="top"><td><code>encoding</code></td> <td> <p>character string giving the encoding to be assumed for the file(s).</p> </td></tr> </table> <h3>Details</h3> <p>This function provides the core of the R help system, but it can be used for other purposes as well, such as <code><a href="../../utils/html/page.html">page</a></code>. </p> <p>How the pager is implemented is highly system-dependent. </p> <p>The basic Unix version concatenates the files (using the headers) to a temporary file, and displays it in the pager selected by the <code>pager</code> argument, which is a character vector specifying a system command (a full path or a command found on the <span class="env">PATH</span>) to run on the set of files. The ‘factory-fresh’ default is to use ‘<span class="file">R_HOME/bin/pager</span>’, which is a shell script running the command-line specified by the environment variable <span class="env">PAGER</span> whose default is set at configuration, usually to <code>less</code>. On a Unix-alike <code>more</code> is used if <code>pager</code> is empty. </p> <p>Most GUI systems will use a separate pager window for each file, and let the user leave it up while <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> continues running. The selection of such pagers could either be done using special pager names being intercepted by lower-level code (such as <code>"internal"</code> and <code>"console"</code> on Windows), or by letting <code>pager</code> be an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> function which will be called with arguments <code>(files, header, title, delete.file)</code> corresponding to the first four arguments of <code>file.show</code> and take care of interfacing to the GUI. </p> <p>The <code>R.app</code> GUI on macOS uses its internal pager irrespective of the setting of <code>pager</code>. </p> <p>Not all implementations will honour <code>delete.file</code>. In particular, using an external pager on Windows does not, as there is no way to know when the external application has finished with the file. </p> <h3>Author(s)</h3> <p>Ross Ihaka, Brian Ripley.</p> <h3>See Also</h3> <p><code><a href="files.html">files</a></code>, <code><a href="list.files.html">list.files</a></code>, <code><a href="../../utils/html/help.html">help</a></code>; <code><a href="../../utils/html/RShowDoc.html">RShowDoc</a></code> call <code>file.show()</code> for <code>type = "text"</code>. Consider <code><a href="options.html">getOption</a>("pdfviewer")</code> and e.g., <code><a href="system.html">system</a></code> for displaying pdf files. </p> <p><code><a href="../../utils/html/file.edit.html">file.edit</a></code>. </p> <h3>Examples</h3> <pre> file.show(file.path(R.home("doc"), "COPYRIGHTS")) </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>