On Fri, Sep 07, 2007 at 02:27:00PM -0400, Duncan Murdoch wrote: > On 9/7/2007 2:15 PM, Gene Selkov wrote: > > Thanks a ton, Duncan! > > > > So I have verified that this line works: > > > > echo "postscript(file=\"\", command=\"cat\"); plot(0)" | r --vanilla > > --slave > > > > Wonderful! (albeit a little unobvious) > > I would include an explicit "dev.off()" after the plotting; I'm not sure > all devices guarantee a clean shutdown when R quits.
And for the record, both littler and Rscript can do that without the need for double quotes, at least under Linux. E.g. both $ r -e 'postscript(file="", command="cat"); plot(0)' | head $ Rscript -e 'postscript(file="", command="cat"); plot(0)' | head provide the same output (of the beginning of the postscript output). Our r is as usual somewhat faster, not that this matters in this non-repeat context. Dirk -- Three out of two people have difficulties with fractions. ______________________________________________ R-help@stat.math.ethz.ch 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.