| 42333 |
ripley |
1 |
% File src/library/utils/man/windows/BATCH.Rd
|
|
|
2 |
% Part of the R package, http://www.R-project.org
|
| 59039 |
ripley |
3 |
% Copyright 1995-2009 R Core Team
|
| 42333 |
ripley |
4 |
% Distributed under GPL 2 or later
|
|
|
5 |
|
| 27445 |
ripley |
6 |
\name{BATCH}
|
| 56186 |
murdoch |
7 |
\alias{BATCH}
|
| 27445 |
ripley |
8 |
\title{Batch Execution of R}
|
|
|
9 |
\description{Run \R non-interactively with input from \code{infile} and
|
|
|
10 |
send output (stdout/stderr) to another file.}
|
| 34292 |
ripley |
11 |
\usage{
|
|
|
12 |
\special{R CMD BATCH [options] infile [outfile]}
|
|
|
13 |
}
|
| 27445 |
ripley |
14 |
\arguments{
|
|
|
15 |
\item{infile}{the name of a file with \R code to be executed.}
|
|
|
16 |
\item{options}{a list of \R command line options, e.g., for setting the
|
|
|
17 |
amount of memory available and controlling the load/save process.
|
| 49704 |
hornik |
18 |
If \code{infile} starts with a \samp{-}, use \option{--} as the final
|
|
|
19 |
option. The default options are \option{--restore --save}.}
|
| 27445 |
ripley |
20 |
\item{outfile}{the name of a file to which to write output. If not
|
|
|
21 |
given, the name used is that of \code{infile}, with a possible
|
|
|
22 |
\file{.R} extension stripped, and \file{.Rout} appended.}
|
|
|
23 |
}
|
|
|
24 |
\details{
|
| 49612 |
hornik |
25 |
Use \command{R CMD BATCH --help} to be reminded of the usage.
|
| 27445 |
ripley |
26 |
|
|
|
27 |
By default, the input commands are printed along with the output. To
|
|
|
28 |
suppress this behavior, add \code{options(echo = FALSE)} at the
|
| 49704 |
hornik |
29 |
beginning of \code{infile}, or use option \option{--slave}.
|
| 27445 |
ripley |
30 |
|
| 40416 |
ripley |
31 |
Files with an incomplete last line (no end of line mark) are
|
| 27445 |
ripley |
32 |
accepted.
|
| 37652 |
ripley |
33 |
|
| 40621 |
ripley |
34 |
A final expression \samp{proc.time()} will be executed after the input
|
| 61162 |
ripley |
35 |
script unless the latter calls \code{\link{q}(runLast = FALSE)} or is aborted.
|
| 47821 |
ripley |
36 |
This can be suppressed by the option \option{--no-timing}.
|
| 61433 |
ripley |
37 |
|
| 37652 |
ripley |
38 |
Additional options can be set by the environment variable
|
| 49704 |
hornik |
39 |
\env{R_BATCH_OPTIONS}: these come after \option{--restore --save}
|
| 37652 |
ripley |
40 |
and before any options given on the command line.
|
| 27445 |
ripley |
41 |
}
|
|
|
42 |
\keyword{utilities}
|
|
|
43 |
|