[R] Printing output in STDOUT

Esmail Bonakdarian esmail.js at gmail.com
Tue May 20 17:48:01 CEST 2008


Edward Wijaya wrote:
> Hi,
> 
> Currently the R script I have is executed with this command:
> 
> $ R CMD BATCH mycode.R
> 
> And the output is stored in mycode.Rout.
> 
> Is there a way I can issue command from shell (like above)
> so that the output is printed to STDOUT?
> 
> It's  troublesome to open the "Rout" file every time to debug.

Under a Unix system you could try to pipe the command into tail -f

i.e.,

$ R CMD BATCH mycode.R | tail -f

That should display the file as it gets written.

I don't have access to a Unix system right now to give this a try
but it should be a work around until someone who knows more about
R can come up with an answer.

HTH

Esmail



More information about the R-help mailing list