Hi! A very basic question, but me and the manual are not friends yet... How do I temporarily stop an execution - that is: stop it until I press a certain key ? /Tomas Svensson -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 tomsv193 at student.liu.se wrote:> Hi! > > A very basic question, but me and the manual are not friends yet... > How do I temporarily stop an execution - that is: stop it until I press > a certain key ?(I would cause that `suspend'' or `pause'' execution.) That''s functionality of your OS/shell, not of R. Since you haven''t told us your OS ... On Unix/Linux ^Z will probably work (restart with fg). On Windows there is no way: it is hard enough to stop rather than pause. On a classic Mac I think you can''t even stop permanently in 1.2.3, but will be able to in 1.3.0. One day when (if) R has execution threads it may be able to suspend them individually. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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:> 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. JonI 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 -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._