| methods_list | R Documentation |
Generate Rd markup to list methods for a generic function.
methods_list() generates a bulleted list and methods_inline()
produces a comma-separated list, suitable for inline use.
You can use them in roxygen2 documentation in two ways:
Compute methods when package is documented:
`r doclisting::methods_list("generic")`
You'll need to include doclisting in Suggests.
Compute methods when documentation is rendered:
`Rd doclisting::methods_list("generic")`
You'll need to include doclisting in Imports.
Methods from the same package as the generic are linked without a package qualifier; methods from other packages include the package name.
methods_list(x, package = NULL)
methods_inline(x, package = NULL)
x |
Name of the generic function (a string). |
package |
Package that defines the generic. Should only be needed in unusual cases as the default will attempt to determine it automatically. |
A string containing Rd markup, or "" if no methods are
found.
cat(methods_list("mean"))
cat(methods_inline("mean"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.