0

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?

Rainer
  • 8,347
  • 1
  • 23
  • 28
  • Have you tried `?print.dmdSchemeSet` while your package is loaded? – duckmayr Jun 17 '19 at 12:10
  • Glad to hear! One other point; it would be more idiomatic to change `Generic print function for \code{dmdSchemeSet}` to `Print method for \code{dmdSchemeSet}` or `Print \code{dmdSchemeSet} objects`, etc.; that is, your function is a method of the generic print function for your `dmdSchemeSet` class, not a generic itself – duckmayr Jun 18 '19 at 10:14
  • Makes sense. I will go through the documentation accordingly. – Rainer Jun 18 '19 at 10:24

0 Answers0