Re: [R] Bug? plot.formula does need support plot.first / plot.last param in plot.default

2024-07-05 Thread Duncan Murdoch
That definitely looks like a bug, but not one that anyone will be eager to fix. It's very old code that tried to be clever, and that's the hardest kind of code to fix. Remember Kernighan's Law: "Everyone knows that debugging is twice as hard as writing a program in the first place. So if you

[R] Bug? plot.formula does need support plot.first / plot.last param in plot.default

2024-07-05 Thread Erez Shomron
Is the following a bug in your opinion? I think so. This works as expected: ``` with(mtcars, plot(wt, mpg, plot.first = { plot.window(range(wt), range(mpg)) arrows(3, 15, 4, 30) })) ``` This does not. ``` plot(mpg ~ wt, data = mtcars, plot.first = { plot.window(range(wt), range(mpg)