Description Usage Arguments Note Examples
This function takes the name of an object (either an R function or an R
data.frame) and replaces it with skeleton roxygen2 documentation. It is used in the documenter_addin()
function which is the installed R addin.
For functions, an empty @param
is generated for each of the funciton's arguments.
For dataframes, a full \description
block is generated from column names
1 2 3 | documenter(objname)
documenter_addin()
|
objname |
A character string naming an R function or data.frame. |
The addin will automatically source the file that the function or data is in.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | documenter("lm")
#' @title FUNCTION_TITLE
#'
#' @description FUNCTION_DESCRIPTION
#'
#' @param formula DESCRIPTION.
#' @param data DESCRIPTION.
#' @param subset DESCRIPTION.
#' @param weights DESCRIPTION.
#' @param na.action DESCRIPTION.
#' @param method DESCRIPTION.
#' @param model DESCRIPTION.
#' @param x DESCRIPTION.
#' @param y DESCRIPTION.
#' @param qr DESCRIPTION.
#' @param singular.ok DESCRIPTION.
#' @param contrasts DESCRIPTION.
#' @param offset DESCRIPTION.
#' @param ... DESCRIPTION.
#'
#' @return RETURN DESCRIPTION
#' @export
documenter("iris")
#' DATASET_TITLE
#'
#' DATASET_DESCRIPTION
#'
#' @format A data frame with 150 rows and 5 variables:
#' \describe{
#' \item{\code{Sepal.Length}}{double. DESCRIPTION.}
#' \item{\code{Sepal.Width}}{double. DESCRIPTION.}
#' \item{\code{Petal.Length}}{double. DESCRIPTION.}
#' \item{\code{Petal.Width}}{double. DESCRIPTION.}
#' \item{\code{Species}}{integer. DESCRIPTION.}
#' }
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.