[Rd] Windows testing
Duncan Murdoch
murdoch@stats.uwo.ca
Wed, 05 Dec 2001 15:13:22 -0500
On 05 Dec 2001 18:35:46 +0100, you wrote in message
<x2vgflzi19.fsf@blueberry.kubism.ku.dk>:
>Duncan Murdoch <murdoch@stats.uwo.ca> writes:
>
>> At this point I have an open graphics window, but the last line hasn't
>> executed yet, so it's blank. As I go through the demo, what shows up
>> is always one step behind the text that I see.
>>
>> Wouldn't it be better to execute the lines that are shown before
>> stopping to get the user's input?
>We might, but not for this release. Basically that's just the way
>par(ask=T) works: ask *before* plotting to a device. It could ask
>afterwards ("Are you through seeing this?") but it doesn't. Presumably
>someone considered the alternatives once upon a time...
I don't think there's any way that par(ask=T) could be made to do this
properly. My suggestion isn't that it's broken, just that it
shouldn't be used by the demo. It's confusing when the text that is
shown isn't synchronized with the picture that is shown.
The reason par(ask=T) couldn't do this is because you want to insert
breaks when you are changing the example, not when the graphics window
is about to be erased. There's no automatic way to do that. You need
to add some code to tell the system that you've changed topics.
An alternative to my
if (ask) readline("Hit enter for next plot...")
additions would be to add a "pause" function (maybe there is one
already, but I don't know it's name); that function could pay
attention to some global option to decide whether to really pause or
just to barrel on through.
>Personally, I'm more miffed by the fact that par(ask=T) by itself
>causes a graphics window to open. This is of course tricky to avoid,
>since you need to have the device before setting its parameters. But
>it is getting in the way of example(), causing it to rattle off all
>graphics output in one go since we wouldn't want to set par(ask=T) on
>help pages that generate no graphics.
A way around this problem would be to add some .Rd command that says
"insert a pause here"; it wouldn't be shown to the user, but the
example would pause at that spot when being played back.
>Of course, we could eventually decide to make the demos more smooth as
>you suggested. Don't forget to unset any previous setting of par(ask=)
>or you will get asked twice per plot....
Is this really a new feature request? I think of it as a bug report:
the demo doesn't demonstrate clearly, so should be fixed. (My
suggestion about the addition of pauses to examples would definitely
be a new feature.)
Duncan
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._