Displaying 1 result from an estimated 1 matches for "znodots".
Did you mean:
nodos
2010 Jun 09
0
Argument mismatches in S3 generic and method
The way R treats the first argument to an S3 method
which uses a different name for the argument than
the generic depends on whether there is a ... in the
argument list. If there is is no ellipsis then
the call cannot tag the argument with either name
but an untagged first argument works:
> zNoDots <- function(x) UseMethod("zNoDots")
> zNoDots.foo <- function(fooObject) { cat("zNoDots.foo: fooObject=")
; dput(fooObject) }
> foo <- structure(1:4, class="foo")
> x <- "x in .GlobalEnv"
> zNoDots(foo)
zNoDots.foo: fooObject...