EVOLUTION-MANAGER
Edit File: BATCH.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: Batch Execution of R</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 BATCH {utils}"><tr><td>BATCH {utils}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Batch Execution of R</h2> <h3>Description</h3> <p>Run <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> non-interactively with input from <code>infile</code> and send output (stdout/stderr) to another file.</p> <h3>Usage</h3> <pre> R CMD BATCH [options] infile [outfile] </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>infile</code></td> <td> <p>the name of a file with <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> code to be executed.</p> </td></tr> <tr valign="top"><td><code>options</code></td> <td> <p>a list of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> command line options, e.g., for setting the amount of memory available and controlling the load/save process. If <code>infile</code> starts with a <span class="samp">-</span>, use <span class="option">--</span> as the final option. The default options are <span class="option">--restore --save --no-readline</span>. (Without <span class="option">--no-readline</span> on Windows.) </p> </td></tr> <tr valign="top"><td><code>outfile</code></td> <td> <p>the name of a file to which to write output. If not given, the name used is that of <code>infile</code>, with a possible ‘<span class="file">.R</span>’ extension stripped, and ‘<span class="file">.Rout</span>’ appended.</p> </td></tr> </table> <h3>Details</h3> <p>Use <code>R CMD BATCH --help</code> to be reminded of the usage. </p> <p>By default, the input commands are printed along with the output. To suppress this behavior, add <code>options(echo = FALSE)</code> at the beginning of <code>infile</code>, or use option <span class="option">--slave</span>. </p> <p>The <code>infile</code> can have end of line marked by LF or CRLF (but not just CR), and files with an incomplete last line (missing end of line (EOL) mark) are processed correctly. </p> <p>A final expression <span class="samp">proc.time()</span> will be executed after the input script unless the latter calls <code><a href="../../base/html/quit.html">q</a>(runLast = FALSE)</code> or is aborted. This can be suppressed by the option <span class="option">--no-timing</span>. </p> <p>Additional options can be set by the environment variable <span class="env">R_BATCH_OPTIONS</span>: these come after the default options (see the description of the <code>options</code> argument) and before any options given on the command line. </p> <h3>Note</h3> <p>On Unix-alikes only: Unlike <code>Splus BATCH</code>, this does not run the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> process in the background. In most shells, </p> <pre>R CMD BATCH [options] infile [outfile] &</pre> <p>will do so. </p> <hr /><div style="text-align: center;">[Package <em>utils</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>