Skip to content
Prev 59959 / 398502 Next

how to pause between plots running scripts?

Thank you.

I am using R 2.0.0 under Windows 2000.

I've tried
1. par(ask=T)
2. readline(prompt = "Pause. Press <Enter> to continue...")

1. script:
x <- 0:20
y <- 5:25
plot(y)
plot(x)
plot(y~x)

output:
[1] TRUE
Hit <Return> to see next plot: plot(x) ####R does not pause after plot(y)
#### it seems R eats the second plot(x)
Hit <Return> to see next plot: ####R does pause here

2.

script:
x <- 0:20
y <- 5:25
plot(y)
readline(prompt = "Pause. Press <Enter> to continue...")
plot(x)
pause()
plot(y~x)

output: ####R does not pause at all
[1] TRUE
Hit <Return> to see next plot: readline(promp #seems plot() eats some characters
Error: syntax error
Hit <Return> to see next plot: pause()
Hit <Return> to see next plot: 

I don't know if I have made some stupid mistakes or messed up some of
configurations.
*************************************************************

On Sat, 27 Nov 2004 13:07:58 -0600, Marc Schwartz
<mschwartz at medanalytics.com> wrote: