Re: [Rd] S3 method dispatch for methods in local environments

2020-05-12 Thread Viechtbauer, Wolfgang (SP)
Behalf Of Sebastian >Meyer >Sent: Tuesday, 12 May, 2020 21:17 >To: r-devel@r-project.org >Subject: Re: [Rd] S3 method dispatch for methods in local environments > >Dear Wolfgang, > >I think this new behaviour is related to the following R 4.0.0 NEWS item: > >> S3

Re: [Rd] S3 method dispatch for methods in local environments

2020-05-12 Thread Sebastian Meyer
Dear Wolfgang, I think this new behaviour is related to the following R 4.0.0 NEWS item: > S3 method lookup now by default skips the elements of the search path between > the global and base environments. Your environment "myenv" is attached at position 2 of the search() path and thus now skip

Re: [Rd] S3 method dispatch for methods in local environments

2020-05-12 Thread Viechtbauer, Wolfgang (SP)
ay, 12 May, 2020 21:05 >To: Viechtbauer, Wolfgang (SP) >Cc: r-devel (r-devel@r-project.org) >Subject: Re: [Rd] S3 method dispatch for methods in local environments > >>>>>> Viechtbauer, Wolfgang (SP) >>>>>> on Tue, 12 May 2020 18:05:32 + wri

Re: [Rd] S3 method dispatch for methods in local environments

2020-05-12 Thread Martin Maechler
> Viechtbauer, Wolfgang (SP) > on Tue, 12 May 2020 18:05:32 + writes: > Dear All, > In R 3.6.3 (and earlier), method dispatch used to work for methods stored in local environments that are attached to the search path. For example: > myfun <- function(y) { > out <

[Rd] S3 method dispatch for methods in local environments

2020-05-12 Thread Viechtbauer, Wolfgang (SP)
Dear All, In R 3.6.3 (and earlier), method dispatch used to work for methods stored in local environments that are attached to the search path. For example: myfun <- function(y) { out <- list(y=y) class(out) <- "myclass" return(out) } print.myclass <- function(x, ...) print(formatC(x$y