The R Project SVN R

Rev

Rev 2195 | Rev 4580 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

#!/bin/sh
#
# ${RHOME}/bin/BATCH

OPTS="--restore --save --no-readline"

while test -n "${1}"; do
    case ${1} in
    --) shift; break ;;
    -v|-n)
        OPTS="${OPTS} ${1} ${2}"; shift 2 ;;
    -*) OPTS="${OPTS} ${1}"; shift ;;
    *)  break ;;
    esac
done

IN=${1}
OUT=${2-`basename ${1} .R`.Rout}

(echo "invisible(options(echo = TRUE))"
 cat ${IN}
 echo "proc.time()"
) | ${RHOME}/bin/R ${OPTS} >${OUT} 2>&1