idocument: Document an interface contract for inserting into roxygen2
Description
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.
Usage
idocument(fn, param = NULL)
Value
a markdown snippet
Arguments
fn
the function that you are documenting
param
the parameter you are documenting (optional. if missing defaults
to the first argument of the function)