I thought that you need a .local() function internal to your S4 method in order to have non-standard arguments.
No, you just let the ... carry new ones.
For roxygen2 you need @name (to know which file.Rd it goes in), @aliases to make explicit the full method signature, and @export.
EG:
.big.extract <- function (x, y, ctstime = FALSE, fact = NULL, verbose = TRUE, ...) {
## etc.
}
##' @name extract
##' @export
##' @aliases extract,function,data.frame-method
setMethod("extract", signature(x = 'function', y = 'data.frame'), .big.extract)
https://stat.ethz.ch/R-manual/R-devel/library/methods/html/setMethod.html
No comments:
Post a Comment