Skip to content
Back to formatted view

Raw Message

Message-ID: <16087.35463.328197.92844@arbres1a.fmr.com>
Date: 2003-05-30T16:44:55Z
From: David Brahm
Subject: R CMD BATCH --vanilla --slave produces unwanted lines

Robin Hankin <r.hankin at auckland.ac.nz> wrote:

> Anyway, now I'm trying to run R in batch mode, but I'm getting extra
> output, which I don't want (RedHat 8.3, R-1.7.0):
...
> r:~% R CMD BATCH --vanilla --slave test.R

Why not just run:
unix> R --vanilla --slave < test.R > test.out

Then the "options(echo=FALSE)" line is unnecessary.  Note an explicit q()
at the end of the script eliminates a single blank line that occurs otherwise.
So the test.R script is just:

  write(rnorm(4),"")
  q()

-- 
                              -- David Brahm (brahm at alum.mit.edu)