Skip to content
Prev 49131 / 63424 Next

S4 Method Dispatch for Class Defined as Attribute

Is setOldClass the solution?

e.g.

x <- list()
class(x) <- "foo"
setGeneric("bar", function(x) "bar generic")
setOldClass("foo")
setMethod("bar", "foo", function(x) "bar foo")
bar(x)
On 7 October 2014 10:00, Dario Strbenac <dstr7320 at uni.sydney.edu.au> wrote: