[R] Enabling s3 methods by attaching environment

2022-12-13 Thread Valentin Petzel
Hello everyone! if we define some S3 method in some environment like this E <- new.env() evalq({ test <- function(x) UseMethod("test") test.character <- function(x) 1 }, envir = E) this works evalq(test("a"), envir = E) but this doesn’t: attach(E) test("a") According to some remarks

Re: [R] bgroup not rendering properly

2022-12-13 Thread Uwe Ligges
Fascinating: I see it with R-4.2.2 and R-patched with the windows() device. But all works well with R-4.2.1 and R-devel. I'll try to investigate. Best, Uwe Ligges On 13.12.2022 14:59, Derek Ogle wrote: Thank you all for your help. I am using Windows. I ran the following both in R 4.2.

Re: [R] bgroup not rendering properly

2022-12-13 Thread Derek Ogle
Thank you all for your help. I am using Windows. I ran the following both in R 4.2.2 using RStudio and not using RStudio (but using the R GUI). In both runs, plots within the GUI/RStudio and in the PNG output exhibited the same issue that I reported originally., whereas plots in the PDF output were

Re: [R] bgroup not rendering properly

2022-12-13 Thread Jinsong Zhao
On 2022/12/13 18:02, Martin Maechler wrote: Jinsong Zhao on Tue, 13 Dec 2022 17:07:00 +0800 writes: > I don > On 2022/12/13 10:13, Derek Ogle wrote: >> bgroup() from plotmath does not render properly for >> me. For example >> >> plot(0,xlim=c(0,1),ylim=c(0

Re: [R] bgroup not rendering properly

2022-12-13 Thread Martin Maechler
> Martin Maechler > on Tue, 13 Dec 2022 11:02:23 +0100 writes: > Jinsong Zhao > on Tue, 13 Dec 2022 17:07:00 +0800 writes: >> I don Jinsong started on top and I did not see his continuation at the very bottom (so scroll down there!) >> On 2022/12/13 10:13, Der

Re: [R] bgroup not rendering properly

2022-12-13 Thread Martin Maechler
> Jinsong Zhao > on Tue, 13 Dec 2022 17:07:00 +0800 writes: > I don > On 2022/12/13 10:13, Derek Ogle wrote: >> bgroup() from plotmath does not render properly for >> me. For example >> >> plot(0,xlim=c(0,1),ylim=c(0,1)) >> text(0.3,0.5,expression(bgroup

Re: [R] bgroup not rendering properly

2022-12-13 Thread Jinsong Zhao
I don On 2022/12/13 10:13, Derek Ogle wrote: bgroup() from plotmath does not render properly for me. For example plot(0,xlim=c(0,1),ylim=c(0,1)) text(0.3,0.5,expression(bgroup('(',atop(x,y),')'))) text(0.7,0.5,expression(group('(',atop(x,y),')'))) and library(ggplot2) ggplot(mtcars, aes(wt, m

Re: [R] bgroup not rendering properly

2022-12-13 Thread Rui Barradas
Às 02:13 de 13/12/2022, Derek Ogle escreveu: bgroup() from plotmath does not render properly for me. For example plot(0,xlim=c(0,1),ylim=c(0,1)) text(0.3,0.5,expression(bgroup('(',atop(x,y),')'))) text(0.7,0.5,expression(group('(',atop(x,y),')'))) and library(ggplot2) ggplot(mtcars, aes(wt, mp