Skip to content
Prev 59955 / 398502 Next

how to pause between plots running scripts?

On Sat, 2004-11-27 at 11:42 -0500, Terry Mu wrote:
The standard way to pause between plots is to set 'par(ask = TRUE)'
before your first plot, which will then prompt you to continue after
each new plot. See ?par for more information.

I am presuming that you are using Windows, which you do not indicate,
with CTRL-R being the command to paste and run code from the R Windows
GUI editor.
readline() function to prompt for user input as the basis for the
pausing.

A scan of the source code in .../gnuwin32/editor.c indicates that the
copy and paste operation to the Rgui console from the editor takes place
via the clipboard in function editorrunselection, if my read is correct.

I would defer to Duncan Murdoch and Prof. Ripley here, but I suspect
that there may be some interaction between readline() and the
copy/paste/run mechanism that precludes pause() from running in this
situation.

A quick test you might want to run would be to replace pause() with:

readline(prompt = "Pause. Press <Enter> to continue...")

in your code to see if this behavior continues, independent of the DAAG
package. You should also notify the DAAG package authors/maintainer of
the issue.

HTH,

Marc Schwartz