Search code examples
rdocumentationr-s4roxygen2

R S4 roxygen2 documentation


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#

Solution

  • 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")