The R Project SVN R

Rev

Rev 4580 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4580 Rev 7002
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# ${R_HOME}/bin/BATCH
3
# ${R_HOME}/bin/BATCH
4
 
4
 
5
OPTS="--restore --save --no-readline"
5
OPTS="--restore --save --no-readline"
6
 
6
 
7
while test -n "${1}"; do
7
while test -n "${1}"; do
8
    case ${1} in
8
    case ${1} in
9
	--) shift; break ;;
9
	--) shift; break ;;
10
	--vsize|--nsize|-v|-n)
10
	--vsize|--nsize|-v|-n)
11
	    OPTS="${OPTS} ${1} ${2}"; shift 2 ;;
11
	    OPTS="${OPTS} ${1} ${2}"; shift 2 ;;
12
	-*) OPTS="${OPTS} ${1}"; shift ;;
12
	-*) OPTS="${OPTS} ${1}"; shift ;;
13
	*)  break ;;
13
	*)  break ;;
14
    esac
14
    esac
15
done
15
done
16
 
16
 
17
IN=${1}
17
IN=${1}
18
OUT=${2-`basename ${1} .R`.Rout}
18
OUT=${2-`basename ${1} .R`.Rout}
19
 
19
 
20
(echo "invisible(options(echo = TRUE))"
20
(echo "invisible(options(echo = TRUE))"
21
 cat ${IN}
21
 cat ${IN}
22
 echo "proc.time()"
22
 echo "proc.time()"
23
) | ${R_HOME}/bin/R ${OPTS} >${OUT} 2>&1
23
) | ${R_HOME}/bin/R ${OPTS} >${OUT} 2>&1