Hi, In 'example(barplot)' running in R, I see 'Hit <Return> to see next plot:', then R waits for my input. I am wondering how to wait for a user response in Rscript. Regards, Peng
Hi Peng I think this is what you are looking for par(ask=T) Alfredo On Sun Sep 06 12:52:31 EDT 2009, Peng Yu <pengyu.ut at gmail.com> wrote:> Hi, > > In 'example(barplot)' running in R, I see 'Hit <Return> to see > next > plot:', then R waits for my input. I am wondering how to wait for > a > user response in Rscript. > > Regards, > Peng > > ______________________________________________ > R-help at 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. > >-- RIOS,ALFREDO ARTURO
On 06/09/2009 12:52 PM, Peng Yu wrote:> Hi, > > In 'example(barplot)' running in R, I see 'Hit <Return> to see next > plot:', then R waits for my input. I am wondering how to wait for a > user response in Rscript.Rscript doesn't run R interactively, so I doubt if there's a way to do this. Rterm has the --ess option that asserts interactive use when reading piped input, so you might be able to do something like Rterm --ess <script.R but that's not the intended use, so you may find other problems. If you want interactive use but don't want the full Rterm or Rgui, you really should be writing your own front-end. It's not trivial, but it's not impossible either, and there are samples included with the R sources. Duncan Murdoch
Reasonably Related Threads
- How to pop up the graphics window from Rscript?
- How to not to terminate read.table if the input file is empty?
- Is 'history' recorded in Rscript?
- Why I get this error? Error in close.connection(f) : invalid connection
- How to convert a string passed as an argument to a vector?