[R] generic/method consistency ?
Torsten Hothorn
Torsten.Hothorn at rzmail.uni-erlangen.de
Tue Jun 18 10:43:48 CEST 2002
> Dear R-list
>
> I am compiling my first R-package and I get this warning:
>
> ...
> * checking generic/method consistency ... WARNING
> plot:
> function(x, ...)
> plot.SimNI:
> function(tags, closedArea, color, ...)
> ...
plot is a generic function with parameter x and dots:
function (x, ...)
{
if (is.null(attr(x, "class")) && is.function(x)) {
if ("ylab" %in% names(list(...)))
plot.function(x, ...)
else plot.function(x, ylab = paste(deparse(substitute(x)),
"(x)"), ...)
}
else UseMethod("plot")
}
therefore, your method "plot.SimNI" must have an argument "x". e.g.
plot.SimNI <- function(x, tags, closedArea, color, ...) {...}
where x is an object of class "SimNI".
Torsten
>
> What does this mean exactly?
>
> Thanks in advance.
>
> Anders.
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list