[R] R CMD BATCH: cat does not print
phhs80 at gmail.com
Thu Aug 30 13:53:58 CEST 2007
On 8/30/07, Barry Rowlingson <b.rowlingson at lancaster.ac.uk> wrote:
> > I am trying to write my first R script. The code is simply
> > cat("Hello!\n")
> > However, when I run
> > $ R CMD BATCH myscript.R
> > I do not see "Hello!" on the console. I am using Fedora 7 (Linux) and R-2.5.1.
> > Any ideas?
> You shouldn't see it on the console! BATCH writes its output to a file.
> You should find a file called myscript.Rout that does contain the
Thanks, Barry. Indeed, the file myscript.Rout exists and contains the
output of cat. I was expecting a behavior similar to the bash scripts.
And by the way, cannot a R script write only on the console and just
what one tells it to write, likewise bash scripts?
More information about the R-help