EVOLUTION-MANAGER
Edit File: commandArgs.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: Extract Command Line Arguments</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 commandArgs {base}"><tr><td>commandArgs {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Extract Command Line Arguments</h2> <h3>Description</h3> <p>Provides access to a copy of the command line arguments supplied when this <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> session was invoked. </p> <h3>Usage</h3> <pre> commandArgs(trailingOnly = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>trailingOnly</code></td> <td> <p>logical. Should only arguments after <span class="option">--args</span> be returned?</p> </td></tr> </table> <h3>Details</h3> <p>These arguments are captured before the standard <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> command line processing takes place. This means that they are the unmodified values. This is especially useful with the <span class="option">--args</span> command-line flag to <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>, as all of the command line after that flag is skipped. </p> <h3>Value</h3> <p>A character vector containing the name of the executable and the user-supplied command line arguments. The first element is the name of the executable by which <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> was invoked. The exact form of this element is platform dependent: it may be the fully qualified name, or simply the last component (or basename) of the application, or for an embedded <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> it can be anything the programmer supplied. </p> <p>If <code>trailingOnly = TRUE</code>, a character vector of those arguments (if any) supplied after <span class="option">--args</span>. </p> <h3>See Also</h3> <p><code><a href="Rhome.html">R.home</a>()</code>, <code><a href="Startup.html">Startup</a></code> and <code><a href="../../utils/html/BATCH.html">BATCH</a></code> </p> <h3>Examples</h3> <pre> commandArgs() ## Spawn a copy of this application as it was invoked, ## subject to shell quoting issues ## system(paste(commandArgs(), collapse = " ")) </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>