Open
Description
library(S7)
foo1 <- new_class("foo1", properties = list(x = class_integer))
foo2 <- new_class("foo2", foo1, properties = list(y = class_double))
method(convert, list(foo1, class_integer)) <- function(from, to) {
from@x
}
ls()
#> [1] "convert" "foo1" "foo2"
I think this is going to be a problem because defining a method for a generic defined in another package will end up embedding a copy of that generic in your package. Not sure what we can do here given that this is a fairly deep seated behaviour of <-
functions.
Metadata
Metadata
Assignees
Labels
No labels