Skip to content

How do I temporarily stop an execution?

2 messages · Jonathan Baron, Brian Ripley

#
If you _know_ in advance that you want to stop at some
point, readline(), is useful.  It is how the demo program
works.  The function stop() is good too, for debugging,
but you can't restart.  Jon
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Tue, 19 Jun 2001, Jonathan Baron wrote:

            
I think I did not understand the aim here, and after I private reply can
suggest:

1) par(ask=T)  stops before each graph.

2) package sm has a simple pause() function using readline that can be
useful:

pause <- function ()
{
    cat("Pause. Press <Enter> to continue...")
    readline()
    invisible()
}

3) Inserting a call to browser() is even better for debugging.

BDR