`body<-` removes the class attributes

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

`body<-` removes the class attributes

Ant F
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")

Best regards,


        [[alternative HTML version deleted]]

[hidden email] mailing list