roxygen2 fails to generate documentation for a simple S4 method with only one parameter. I am giving example code with class A and method B below:
#' A Class
#'
#' Example class.
#'
#' @name A-class
#' @rdname A-class
#' @exportClass A
setClass("A", representation(), prototype = prototype())
setGeneric("B", function(.Object) standardGeneric("B"))
#' B-methods
#'
#' Example method on class A.
#'
#' @return The given object, invisibly.
#'
#' @docType methods
#' @rdname B-methods
#' @aliases B,A-method
#' @export
setMethod("B", "A",
function(.Object) {
return(invisible(.Object))
}
)