The R Project SVN R

Rev

Rev 37351 | Rev 40417 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37351 Rev 37649
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# ${R_HOME}/bin/BATCH
3
# ${R_HOME}/bin/BATCH
4
 
4
 
5
revision='$Rev: 37351 $'
5
revision='$Rev: 37649 $'
6
version=`set - ${revision}; echo ${2}`
6
version=`set - ${revision}; echo ${2}`
7
version="R batch front end ${version}
7
version="R batch front end ${version}
8
 
8
 
9
Copyright (C) 2000--2005 The R Core Development Team.
9
Copyright (C) 2000--2006 The R Core Development Team.
10
This is free software; see the GNU General Public Licence version 2
10
This is free software; see the GNU General Public Licence version 2
11
or later for copying conditions.  There is NO warranty."
11
or later for copying conditions.  There is NO warranty."
12
 
12
 
13
opts="--restore --save --no-readline"
13
opts="--restore --save --no-readline"
14
 
14
 
Line 25... Line 25...
25
  --			end processing of options
25
  --			end processing of options
26
 
26
 
27
Further arguments starting with a '-' are considered as options as long
27
Further arguments starting with a '-' are considered as options as long
28
as '--' was not encountered, and are passed on to the R process, which
28
as '--' was not encountered, and are passed on to the R process, which
29
by default is started with '$opts'.
29
by default is started with '$opts'.
30
See also help(BATCH) inside R;
30
See also help(BATCH) inside R.
31
 
31
 
32
Report bugs to <r-bugs@r-project.org>."
32
Report bugs to <r-bugs@r-project.org>."
33
 
33
 
34
while test -n "${1}"; do
34
while test -n "${1}"; do
35
  case ${1} in
35
  case ${1} in
Line 47... Line 47...
47
out=${2-`basename ${1} .R`.Rout}
47
out=${2-`basename ${1} .R`.Rout}
48
 
48
 
49
(echo "invisible(options(echo = TRUE))"
49
(echo "invisible(options(echo = TRUE))"
50
  cat ${in}
50
  cat ${in}
51
  echo ''; echo "proc.time()"
51
  echo ''; echo "proc.time()"
52
) | ${R_HOME}/bin/R ${opts} >${out} 2>&1
52
) | ${R_HOME}/bin/R ${opts} ${R_BATCH_OPTIONS} >${out} 2>&1
53
 
53
 
54
### Local Variables: ***
54
### Local Variables: ***
55
### mode: sh ***
55
### mode: sh ***
56
### sh-indentation: 2 ***
56
### sh-indentation: 2 ***
57
### End: ***
57
### End: ***