Thanks Bill! Next time, I'll try literacy.
William Dunlap wrote:
-----Original Message-----
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Benjamin Tyner
Sent: Thursday, June 23, 2011 5:31 PM
To: r-help@r-project.org
Subject: [R] 'Rscript -e' and stdout() puzzle
Hello,
I am curious to know why the output of
Rscript -e "cat(R.version.string,stdout())"
includes a trailing " 1", whereas
Rscript -e "cat(R.version.string)"
Use file=stdout(). Otherwise it prints the value of
as.character(stdout()), which is 1.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
does not. I have tried various mechanisms to subvert this
behavior, such as
Rscript -e "invisible(con<-stdout()); cat(R.version.string, con);
rm(con); q()"
but the trailing " 1" remains.
Thanks,
Ben
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.