When running
R CMD BATCH [options] filename.r
I want to control where the output is printed. I can suppress the creation of the .Rout file with
R CMD BATCH [options] filename.r /dev/null
but is it possible to direct the output to the screen? Like when I run it by
R [options] < filename.r
?
Guess you're on linux. Tried already to redirect to /dev/console ?
Edit -add info from the comments -:
/dev/console apparently doesn't work, /dev/tty does. Depending on the system, /dev/tty0 might be an option too
Cheers
Try Rscript
or R --no-save < filename.R
:
biocoreap1:Desktop vinceb$ Rscript test.R
test
biocoreap1:Desktop vinceb$ R --no-save < test.R
R version 2.10.1 (2009-12-14)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
[...]
[Previously saved workspace restored]
> cat('test\n')
test
>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With