[Rd] Documenting revised functions

From: <jhallman_at_frb.gov>
Date: Tue 12 Dec 2006 - 15:51:43 GMT

I am running into some problems with the way R CMD check looks at documentation.

The stats::filter function returns a time series with class "ts" or c("mts", "ts") if it is multivariate. I have created a more capable time series class called "tis" as part of my fame package. My package redefines filter() as a generic function, and has filter.default() call the stats::filter function. The filter.tis() function calls filter.default() and turns the result into a tis series.

My problem is how to document this. Since my package exports filter(), it needs an \alias{filter} in an Rd document, otherwise R CMD check complains about an undocumented object. However, when I fix that by having an Rd document with \alias{filter} in it, help(filter) puts up the too-small tk_select.list() menu I've complained about before to ask me which help document I want, the package::fame one or the package::stats one. And because the generic filter() is now

filter <- function (x, ...) UseMethod("filter")

the filter.default() function also has to have a useless ... argument in it to avoid this warning from R CMD check:

Of course, if I add the ... argument to filter.default(), I then have to add an \item{\dots} to its help document, wherein I get to explain to the mystified reader that the argument is ignored.

Am I missing something here? How should I go about documenting my generic filter() and its methods?


R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed Dec 13 23:41:56 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 13 Dec 2006 - 13:30:54 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.