Re: [Rd] class extension and documentation

From: Duncan Murdoch <murdoch.duncan_at_gmail.com>
Date: Mon, 05 Dec 2011 13:48:19 -0500

On 05/12/2011 12:11 PM, Terry Therneau wrote:
> I've added a "backsolve" method to the bdsmatrix library.
> Per the Extending manual section 7.1 I've also added the following 3
> lines along with my setMethod definitions for 2 classes.
>
> backsolve<- function(r, ...) UseMethod("backsolve")
> backsolve.default<- base:::backsolve
> formals(backsolve.default)<- c(formals(backsolve.default), alist(...
> = ))
>
> I've also added a backsolve-methods.Rd page, though since my arguments
> are identical to the default it doesn't say much. And, after a test
> failed, added the new backsolve.default routine to my export list.
>
> Now R CMD check claims that I need Rd pages for backsolve and
> backsolve.default. I don't think I should rewrite those.
> How do I sidestep this and/or
> what other manuals should I read?

Even though your change is subtle, I'd say it's still a change (backsolve is now a generic, not a simple closure; it now has a different argument list), so I'd like to see a new man page added. It would be quite reasonable to list the new interface and then refer to base::backsolve for the details of what the default method does.

Duncan Murdoch

> Perhaps do setMethod("backsolve", signature(r="ALL"),
> base:::backsolve(r, ...))
> instead?
>
> Terry Therneau
>
> ______________________________________________
> 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 Mon 05 Dec 2011 - 18:50:47 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 Mon 05 Dec 2011 - 20:40:15 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