idocument | R Documentation |
roxygen2
This function is expected to be called within the documentation of a function
as inline code in the parameter documentation of the function. It details the
expected columns that the input dataframe should possess. This has mostly
been superseded by the @iparam <name> <description>
roxygen2
tag which does
this automatically, however in some circumstances (particularly multiple
dispatch) you may want to assemble dataframe documentation manually.
idocument(fn, param = NULL)
fn |
the function that you are documenting |
param |
the parameter you are documenting (optional. if missing defaults to the first argument of the function) |
a markdown snippet
#' @param df `r idocument(x, df)`
x = function(df = iface( col1 = integer ~ "an integer column" )) {}
cat(idocument(x, df))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.