[Rd] Problems caused by dev.off() behaviour

2023-10-02 Thread Duncan Murdoch
I found some weird behaviour and reported it as https://bugs.r-project.org/show_bug.cgi?id=18604 and https://github.com/yihui/knitr/issues/2297, but it turns out it was user error. The dev.off() function was behaving as documented, but it behaves in an unexpected (by me) way, and that caused

[Rd] Should `expand.grid()` consistently drop `NULL` inputs?

2023-10-02 Thread Davis Vaughan via R-devel
Hi all, I noticed that `expand.grid()` has somewhat inconsistent behavior with dropping `NULL` inputs. In particular, if there is a leading `NULL`, then it ends up as a column in the resulting data frame, which seems pretty undesirable. Also, notice in the last example that `Var3` is used as the

Re: [Rd] After package update, old S4 method is dispatched

2023-10-02 Thread Simon Urbanek
Jan, have you re-installed all packages? If you change (update) any package that uses S4 it may be necessary to re-install all its reverse-dependencies as well since they may include cached values in their namespaces, so the easiest is to make sure you re-install all packages. Cheers, Simon

Re: [Rd] Problems caused by dev.off() behaviour

2023-10-02 Thread Trevor Davis
> Use it just like dev.off(), but it *will* restore the previous device. I'm observing that if there were no previously open graphics devices then your `safe.dev.off()` opens up a new graphics device which may be an undesired side effect (because "surprisingly" `dev.set()` on the null graphics

Re: [Rd] Problems caused by dev.off() behaviour

2023-10-02 Thread Duncan Murdoch
Thanks! However, isn't length(dev.list()) == 0 when there are no devices? That's what I'm seeing on MacOS. Duncan Murdoch On 02/10/2023 4:21 p.m., Trevor Davis wrote: > Use it just like dev.off(), but it *will* restore the previous device. I'm observing that if there were no previously

Re: [Rd] Problems caused by dev.off() behaviour

2023-10-02 Thread Trevor Davis
> Thanks! However, isn't length(dev.list()) == 0 when there are no devices? That's what I'm seeing on MacOS. If there is only one graphics device then R should automatically set it as the active graphics device so it isn't really necessary to manually set it. Although there wouldn't be any

Re: [Rd] [R-pkg-devel] Problem with "compacting" pdf files.

2023-10-02 Thread Ivan Krylov
Dear Rolf, (Moving this one to R-devel...) On Sun, 1 Oct 2023 21:01:13 + Rolf Turner wrote: > I *really* think that the instructions from CRAN could have been > clearer! Without your guidance I'd have been at a total loss. Since the CRAN e-mails quote the R CMD check messages verbatim,

[Rd] After package update, old S4 method is dispatched

2023-10-02 Thread Jan Netík
Hello R-devel, I hope that you are all doing well and that this is the right place to discuss my somewhat mysterious issue with S4. On our Ubuntu server, we have "mirt" package installed which defines S4 method for "coef" standard generic. We updated the package with the usual

Re: [Rd] [R-pkg-devel] Problem with "compacting" pdf files.

2023-10-02 Thread Michael Dewey
Dear Ivan I was bitten by this recently but fortunately Rolf had beaten me to writing a question. The one thing which really surprised me is that the current message tells me how much space it would have saved if it had compressed the files in which case my immediate response was "Well, why