问题
I'm using roxygen2 for documentation in S4 and for some reason the usage section is not showing up. I made a simple example to show my confusion:
#' Title
#'
#' @param x Temp
#'
#' @return Nothing of interest.
#'
#' @export
#' @docType methods
#' @rdname A-methods
setGeneric("A", function(x, ...){
cat("test\n")
standardGeneric("A")
})
#' @rdname A-methods
#' @aliases A,ANY,ANY-method
setMethod("A", "ANY", function(x, ...){
cat(class(x))
})
#END#
回答1:
IMHO that is a common problem. You could try to use the s4 branch of roxygen. (For my small packages it works well.). To install the s4 branch from github:
library("devtools")
install_github("roxygen", "klutometis", ref="s4")
来源:https://stackoverflow.com/questions/18901589/r-s4-roxygen2-documentation