From @nto|ne@|@br| @end|ng |rom gm@||@com  Thu Nov 21 12:35:22 2019
From: @nto|ne@|@br| @end|ng |rom gm@||@com (Antoine Fabri)
Date: Thu, 21 Nov 2019 12:35:22 +0100
Subject: [Rd] `body<-` removes the class attributes
Message-ID: <CAEKh8uiXB4p06wpxriKh1JkLCuy7c-xKk9R-CZJiYj10vHUbvQ@mail.gmail.com>

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 deleted]]



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