\HeaderA{commandArgs}{Extract Command Line Arguments}{commandArgs}
\keyword{environment}{commandArgs}
\keyword{sysdata}{commandArgs}
\keyword{programming}{commandArgs}
\begin{Description}\relax
Provides access to a copy of the command line arguments supplied when
this \R{} session was invoked.
\end{Description}
\begin{Usage}
\begin{verbatim}
commandArgs()
\end{verbatim}
\end{Usage}
\begin{Details}\relax
These arguments are captured before the standard \R{} command line
processing takes place.  This means that they are the unmodified
values.  If it were useful, we could provide support an argument which
indicated whether we want the unprocessed or processed values.

This is especially useful with the \code{--args} command-line flag to
\R, as all of the command line after than flag is skipped.
\end{Details}
\begin{Value}
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 \R{} was invoked.  As far as I am aware, 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.
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{BATCH}{BATCH}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
commandArgs()
## Spawn a copy of this application as it was invoked.
## system(paste(commandArgs(), collapse=" "))
\end{ExampleCode}
\end{Examples}

