Displaying 1 result from an estimated 1 matches for "nnargs".
Did you mean:
nargs
2007 Jan 28
0
"[", .local and S4 methods (was: "[" operator and indexing ambiguity)
...ed whether people think that this is
the desired behaviour.
### ------------------- example code ---------------------------
setClass("foo", representation(x="array"))
a = new("foo")
myfun = function (x, i, j, k, ..., drop=TRUE) {
cat(paste(match.call()), "\nnargs()=", nargs(),
missing(i), missing(j), missing(k), missing(drop), "\n\n")
return(invisible(NULL))
}
setMethod ("[", signature(x="foo", i="numeric", j="missing"), myfun)
a[7]
a[7,]
myfun(a, 7)
myfun(a, 7, )
showMethods("[", c...