Dear all,

I've found this nice code fragment on the web
(from Jan T. Kim if I'm correct):

hitReturn <- function(msg)
{
        invisible(readline(sprintf("%s -- hit return", msg)));
}

But it does not seem to work in non-interactive mode
( I mean, when I start a script like this: R --vanilla < script.R )

It simply continues, I guess the stdin is not connected?

Does somebody know how to make it work.

My script plots a few graphs (in X11 windows) and I don't want them to
disappear immediately.
A Sys.sleep(infinite) would probably work, but I thought there might
be a better solution?

Thanks,
Jonne.

______________________________________________
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