[R] R CMD BATCH --vanilla --slave produces unwanted lines

Robin Hankin r.hankin at auckland.ac.nz
Thu May 29 23:27:52 CEST 2003


Hello list

(thanks for all the help on my data.frame() question, especially to
Professor R for a working script...I was pleased to see the solution
wasn't obvious!)

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:~% cat test.R
options(echo=FALSE)
write(rnorm(4),"")

r:~% R CMD BATCH --vanilla --slave test.R
r:~% cat test.Rout 
> options(echo=FALSE)
0.1500393 0.1067567 0.2707306 -1.657154
[1] 1.82 0.07 1.87 0.00 0.00
r:~% 


I just want the four random variables, not the "options(echo=FALSE)"
line nor the final line which looks like the output of a proc.time()
call (how come this is called at all if I'm using the --vanilla flag?)

How do I arrange for test.Rout to contain just a single line of four
random variables?



-- 

Robin Hankin, Lecturer,
School of Geography and Environmental Science
Tamaki Campus
Private Bag 92019 Auckland
New Zealand

r.hankin at auckland.ac.nz
tel 0064-9-373-7599 x6820; FAX 0064-9-373-7042




More information about the R-help mailing list