[R] R CMD BATCH --vanilla --slave produces unwanted lines
Thomas W Blackwell
tblackw at umich.edu
Fri May 30 13:51:32 CEST 2003
Supply a separate output file name explicitly to write().
- tom blackwell - u michigan medical school - ann arbor -
On Fri, 30 May 2003, Robin Hankin 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:~% 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