Re: [Rd] Need to tell R CMD check that a function qr.R is not a method

From: Henrik Bengtsson <hb_at_biostat.ucsf.edu>
Date: Fri, 07 Sep 2012 10:18:56 -0700

Would a workaround (for pleasing R CMD check) be to do:

qr.R <- function(...) UseMethod("qr.R", ...)

qr.R.qr <- function(qr, complete, pivot) {   # No need to assert the class of 'qr' here.   ...
}

Haven't tried it. Method dispatching may also add unnecessary overhead if called lots of times.

/Henrik

On Fri, Sep 7, 2012 at 9:55 AM, Uwe Ligges <ligges_at_statistik.tu-dortmund.de> wrote:
>
>
> On 07.09.2012 17:05, Tim Hesterberg wrote:
>>
>> When creating a package, I would like a way to tell R that
>> a function with a period in its name is not a method.
>
>
> You can't. There are few exception for historic names (S definitions)
> hardcoded in R.
>
> Best,
> Uwe
>
>
>
>>
>> I'm writing a package now with a modified version of qr.R.
>> R CMD check gives warnings:
>>
>> * checking S3 generic/method consistency ... WARNING
>> qr:
>> function(x, ...)
>> qr.R:
>> function(qr, complete, pivot)
>>
>> See section ‘Generic functions and methods’ of the ‘Writing R
>> Extensions’ manual.
>>
>> * checking Rd \usage sections ... NOTE
>> S3 methods shown with full name in documentation object 'QR.Auxiliaries':
>> ‘qr.R’
>>
>> The \usage entries for S3 methods should use the \method markup and
>> not their full name.
>> See the chapter ‘Writing R documentation files’ in the ‘Writing R
>> Extensions’ manual.
>>
>> [[alternative HTML version deleted]]
>>
>>
>>
>> ______________________________________________
>> R-devel_at_r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 07 Sep 2012 - 17:25:07 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 07 Sep 2012 - 18:20:41 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive