Package 'documenteR'

Title: RStudio Addin to Standardize Writing Documentation
Description: An RStudio addin that builds the skeleton of documentation for an R function or dataframe using the roxygen2 syntax.
Authors: Shaurita Hutchins [aut, cre]
Maintainer: Shaurita Hutchins <[email protected]>
License: MIT + file LICENSE
Version: 0.1
Built: 2026-06-10 02:48:54 UTC
Source: https://github.com/sdhutchins/documenteR

Help Index


Document an R object

Description

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

Usage

documenter(objname, envir = NULL)

documenter_addin()

Arguments

objname

A character string naming an R function or data.frame.

envir

An optional environment used to resolve objname. When supplied, documenteR looks only in that environment.

Note

The addin will automatically source the file that the function or data is in.

Examples

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}}{factor. DESCRIPTION.}
#' }