[Rd] class() |--> c("matrix", "arrary") -- and S3 dispatch

2019-11-21 Thread Martin Maechler
TLDR: This is quite technical, still somewhat important: 1) R 4.0.0 will become a bit more coherent: a matrix is an array 2) Your package (or one you use) may be affected. > Martin Maechler > on Fri, 15 Nov 2019 17:31:15 +0100 writes: > Pages, Herve > on

[Rd] `body<-` removes the class attributes

2019-11-21 Thread Antoine Fabri
Dear all, `body<-` removes the class of the input function, it's undocumented and I not what I would expect. ``` r foo <- function() {1} class(foo) <- "bar" attr(foo, "class") #> [1] "bar" body(foo) <- 2 attr(foo, "class") #> NULL ``` Best regards, Antoine [[alternative HTML version de