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

______________________________________________
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.

Reply via email to