现有泛型的 Roxygen 文档

Roxygen documentation for existing generics

我为我在包中定义的 S4 class myclass 编写了一个 show() 方法。我使用 roxygen2 为 class 和方法生成了文档。一切正常,除了我在 R CMD 检查结果中收到以下警告:

checking for missing documentation entries ... WARNING
Undocumented S4 methods: generic 'length' and siglist 'myclass'

我如何着手记录 show 不是我自己编写的泛型?

最后,使用明确的 @aliases@docType 标签为我解决了这个问题。我的文档块现在看起来像这样:

#' Show method for objects of class \code{myclass}.
#'
#' @docType methods
#' @name show-myclass
#' @rdname show-myclass
#' @aliases show-myclass show,myclass-method
#'
#' @param x A \code{myclass} object.
#'
#' @export