Hi all, in my package I have a function with name plot.cor (this function is inherited from another legacy package). According to CRAN package checks reports, the check apparently thinks plot.cor is a method for the plot generic (I hope I'm using the correct terminology). checking Rd \usage sections ... NOTE S3 methods shown with full name in documentation object 'plot.cor': ?plot.cor? Although technically it doesn't seem to be an error (and CRAN maintainers haven't warned me about this), I was asked to clean up the package to the point where the package check goes through without any problems. My question is: do I need to rename the function (e.g. to plotCor, which won't be mistaken for an S3 method) or is there a way to tell R that this is not an S3 method? Thanks, Peter
Prof Brian Ripley
2011-Aug-04 05:14 UTC
[R] R CMD check thinks my function is an S3 method
On Wed, 3 Aug 2011, Peter Langfelder wrote:> Hi all, > > in my package I have a function with name plot.cor (this function is > inherited from another legacy package). According to CRAN package > checks reports, the check apparently thinks plot.cor is a method for > the plot generic (I hope I'm using the correct terminology). > > checking Rd \usage sections ... NOTE > S3 methods shown with full name in documentation object 'plot.cor': > ?plot.cor? > > > Although technically it doesn't seem to be an error (and CRANTechnically this is an error if you did not intend it to be an S3 method: the note says you incorrectly documented your S3 method.> maintainers haven't warned me about this), I was asked to clean up the > package to the point where the package check goes through without any > problems. > > My question is: do I need to rename the function (e.g. to plotCor, > which won't be mistaken for an S3 method) or is there a way to tell R > that this is not an S3 method?The former. (There is a list of historical exceptions used by R CMD check, but we will not be adding to it for new packages.)> > Thanks, > > Peter > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- 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 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Possibly Parallel Threads
- R CMD check: should .Rout.save contain the new "Registered S3 method overwritten by" message?
- R CMD check warning with S3 method
- R CMD check -- non S3 method warning
- S3 generic/method consistency issue with R CMD check
- Need to tell R CMD check that a function qr.R is not a method