-
Notifications
You must be signed in to change notification settings - Fork 238
Description
Hi, I have the following problem while documenting a S4-generic and its methods:
When I define a method where the trailing argument has type "ANY" an entry in the documentation is only created for the signature "numeric" instead of numeric,ANY in the following example:
#' new generic
#'
#' @rdname myGeneric
#' @export
setGeneric("myGeneric", function(x, y) standardGeneric("myGeneric"))
#' @rdname myGeneric
#' @export
setMethod("myGeneric", c("numeric", "ANY"), function(x, y) x)This results in a warning from R CMD check because the numeric,ANY method documentation entry is missing. I suspect that this happens because methods("myGeneric") will report that there is only a method for signature "numeric" and hence roxygen will only create a doc entry for this signature. This is only an issue when the last argument is of type "ANY" - a different order will work - since methods will report the correct signature.
Don't know if this is solvable within roxygen2. My attempts to bypass the issue by creating the doc entry manually have failed so far. I am using roxygen2 version 5.0.1 and R3.2.2 on Ubuntu 14.10
Thanks,
-s