3
我想爲我創建的對象定義「c」方法。用3個點定義S4方法
像
setMethod("c",
signature(...),
definition=function (...) {
myObject = list(...)[[1]]
[email protected]=lapply(list(...), FUN = function(x) slot(x, "mySlot"))
return(myObject)
}
)
的問題是,我不能定義類的......,這樣的調度做得好。 有什麼想法?
看看'getGeneric( 「C」)' - 你定義在'x',不'...'方法。 – hadley