问题
I am extending the print()
function by a method print.dmdSchemeSet()
. This functions has additional arguments which I obviously have documented in the source files using roxygen2:
#' Generic print function for \code{dmdSchemeSet}
#'
#' @param x object of type \code{dmdSchemeSet}
#' @param ... additional arguments - not used here
#' @param printAttr default \code{TRUE} - attributes are printed
#' @param printExtAttr default \code{FALSE} - additional attributes are not printed (e.g. \code{class})
#' @param printData default \code{TRUE} - data is printed
#' @param .prefix mainly for internal use - prefix for all printed lines
#'
#' @return invisibly x
#' @export
#'
print.dmdSchemeSet <- function(x, ..., printAttr = TRUE, printExtAttr = FALSE, printData = TRUE, .prefix = ""){
...
}
Now the function is only exported as a generic function, which is fine, and it works.
But how can the user view the documentation for these functions?
Can I make the documentations in such a way, that it can be found in an intuitive way by the user?
来源:https://stackoverflow.com/questions/56630954/documenting-generic-s3-methods-in-r-so-that-user-can-see-documentation