Rev 27445 | Blame | Last modification | View Log | Download | RSS feed
\name{BATCH}\alias{BATCH}\title{Batch Execution of R}\description{Run \R non-interactively with input from \code{infile} andsend output (stdout/stderr) to another file.}\usage{R CMD BATCH [options] infile [outfile]}\arguments{\item{infile}{the name of a file with \R code to be executed.}\item{options}{a list of \R command line options, e.g., for setting theamount of memory available and controlling the load/save process.If \code{infile} starts with a \samp{-}, use \samp{--} as the finaloption. The default options are \samp{--restore --save --no-readline}.}\item{outfile}{the name of a file to which to write output. If notgiven, the name used is that of \code{infile}, with a possible\file{.R} extension stripped, and \file{.Rout} appended.}}\details{Use \code{R CMD BATCH --help} to be reminded of the usage.By default, the input commands are printed along with the output. Tosuppress this behavior, add \code{options(echo = FALSE)} at thebeginning of \code{infile}.The \code{infile} can have end of line marked by LF or CRLF (but notjust CR), and files with an incomplete last line (missing end of line(EOL) mark) are processed correctly.Using \code{R CMD BATCH} sets the GUI to \code{"none"}, so none of\code{\link[graphics]{x11}}, \code{\link[graphics]{jpeg}}and \code{\link[graphics]{png}} are available.}\note{Unlike \code{Splus BATCH}, this does not run the \R process in thebackground. In most shells,\code{R CMD BATCH [options] infile [outfile] &}will do so.Report bugs to \email{r-bugs@r-project.org}.}\keyword{utilities}