Description Usage Arguments Details Note Examples
This RStudio addin takes the name of an object (either an R function or an R data.frame), and replaces it with some skeleton roxygen2 documentation.
1 2 3 | doc_this_addin()
doc_this(objname)
|
objname |
A character string naming an R function or data.frame. |
For functions, empty @param
s are generated from the function's arguments, while for dataframes a full \description
block is generated from column names
The object must be available within the evaulation environment.
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 37 | doc_this("lm")
#' FUNCTION TITLE
#'
#' 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
#' @examples
#' # ADD EXAMPLES HERE
doc_this("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.