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, ...) ... 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On 18 Jun 2002, Anders Nielsen wrote:> 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, ...) > ... > > What does this mean exactly?The first argument of a plot method is named `x' according to the generic, but yours is called `tags'. See `Writing R Extensions' for why these need to match. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._