Env: Win XP, R 2.9.2]
It's a minor annoyance, but I find that after I run example(), the
console state of prompting to press Enter for
each new graph remains as it is under example. It's more annoying that
it seems difficult to turn this behavior
off!
In a fresh session:
> getOption("example.ask")
[1] "default"
Run an example:
plot> require(stats)
plot> plot(cars)
Waiting to confirm page change...
...
> getOption("example.ask")
[1] "default"
# do another plot:
Waiting to confirm page change...
> options("example.ask"=FALSE)
> plot(sin, -pi, 2*pi)
Waiting to confirm page change...
# try resetting devAskNewPage
> devAskNewPage(ask = NULL)
Waiting to confirm page change...
There does seem to be code in example to reset this state on exit, and
I'm baffled why it doesn't actually
do it
...
if (ask == "default")
ask <- echo && grDevices::dev.interactive(orNone = TRUE)
if (ask) {
if (.Device != "null device") {
oldask <- grDevices::devAskNewPage(ask = TRUE)
if (!oldask)
on.exit(grDevices::devAskNewPage(oldask), add = TRUE)
}
op <- options(device.ask.default = TRUE)
on.exit(options(op), add = TRUE)
}
...
So, how can I restore the previous state of plotting w/out prompting?