BATCH                 package:utils                 R Documentation

_B_a_t_c_h _E_x_e_c_u_t_i_o_n _o_f _R

_D_e_s_c_r_i_p_t_i_o_n:

     Run R non-interactively with input from 'infile' and send output
     (stdout/stderr) to another file.

_U_s_a_g_e:

     R CMD BATCH [options] infile [outfile]

_A_r_g_u_m_e_n_t_s:

  infile: the name of a file with R code to be executed.

 options: a list of R command line options, e.g., for setting the
          amount of memory available and controlling the load/save
          process. If 'infile' starts with a '-', use '--' as the final
          option.  The default options are '--restore --save
          --no-readline'.

 outfile: the name of a file to which to write output.  If not given,
          the name used is that of 'infile', with a possible '.R'
          extension stripped, and '.Rout' appended.

_D_e_t_a_i_l_s:

     Use 'R CMD BATCH --help' to be reminded of the usage.

     By default, the input commands are printed along with the output. 
     To suppress this behavior, add 'options(echo = FALSE)' at the
     beginning of 'infile'.

     The 'infile' 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.

     Additional options can be set by the environment variable
     'R_BATCH_OPTIONS': these come after '--restore --save
     --no-readline' and before any options given on the command line.

_N_o_t_e:

     Unlike 'Splus BATCH', this does not run the R process in the
     background.  In most shells, 'R CMD BATCH [options] infile
     [outfile] &' will do so.

     Report bugs to r-bugs@r-project.org.

