When programming in r with the s4 OOP system, when one have to use setReplaceMethod
? I don\'t see what\'s the difference wit
Here's the definition of setReplaceMethod
> setReplaceMethod
function (f, ..., where = topenv(parent.frame()))
setMethod(paste0(f, "<-"), ..., where = where)
<bytecode: 0x435e9d0>
<environment: namespace:methods>
It is pasting a "<-" on to the name, so is functionally equivalent to setMethod("$<-")
. setReplaceMethod conveys more semantic meaning.