[R] check WARNING...

Emmanuel Paradis paradis at isem.univ-montp2.fr
Tue Dec 2 11:45:15 CET 2003


A 18:35 02/12/2003 +1300, Jason Turner a écrit:
>Jeff D. Hamann wrote:
>
>>I've been developing a package and have been getting the following warning
>>when running the check command:
>>* checking S3 generic/method consistency ... WARNING
>>plot:
>>   function(x, ...)
>>plot.summaries:
>>   function(trees, sp)
>
>I'm unclear; is "summaries" a class?  If not, try naming the function 
>plotSummaries, or some such thing (no dot ".")
>
>Cheers

And if yes, you can rename the main argument inside the function:

plot.summaries <- function(x, sp, ...)
{
trees <- x
rm(x)
[...]
}

This allows you to keep the object name 'trees' inside the function.

Note that the "dot dot dot" (...) argument MUST be included in this case 
(use of the generic function plot). Have a look at the Writing R Extensions 
manual: there are very useful information there when writing a package.

Emmanuel Paradis



>Jason
>--
>Indigo Industrial Controls Ltd.
>http://www.indigoindustrial.co.nz
>64-21-343-545
>jasont at indigoindustrial.co.nz
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list