Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sdhutchins/documenteR
An RStudio addin to create skeleton roxygen2 documentation for functions & data.frames.
https://github.com/sdhutchins/documenteR
document documentation r roxygen roxygen-skeletons roxygen2
Last synced: about 2 months ago
JSON representation
An RStudio addin to create skeleton roxygen2 documentation for functions & data.frames.
- Host: GitHub
- URL: https://github.com/sdhutchins/documenteR
- Owner: sdhutchins
- License: other
- Created: 2018-08-31T02:54:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-07T19:02:21.000Z (over 5 years ago)
- Last Synced: 2024-11-05T05:42:26.819Z (3 months ago)
- Topics: document, documentation, r, roxygen, roxygen-skeletons, roxygen2
- Language: R
- Homepage: http://www.shauritahutchins.com/documenteR/
- Size: 45.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - sdhutchins/documenteR - An RStudio addin to create skeleton roxygen2 documentation for functions & data.frames. (R)
README
[![Travis build status](https://travis-ci.org/sdhutchins/documenteR.svg?branch=master)](https://travis-ci.org/sdhutchins/documenteR)
[![Coverage status](https://codecov.io/gh/sdhutchins/documenteR/branch/master/graph/badge.svg)](https://codecov.io/github/sdhutchins/documenteR?branch=master)# documenteR
An RStudio addin that builds the skeleton of documentation for an R function or dataframe using roxygen2 syntax.
This addin has been modified from [@mdlincoln](https://github.com/mdlincoln)'s [docthis](https://github.com/mdlincoln/docthis) to fit more with Hadley's [notes on documenting R packages](http://r-pkgs.had.co.nz/man.html).
## Installation
```r
devtools::install_github("sdhutchins/documenteR")
```## Examples
IF you've witten a function but haven't created documentation for it, select the function tile, and call the "Document an object" addin, which will paste in skeleton roxygen2 documentation above your function definition:
### Document a function
```r
#' @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
```### Document a dataframe
This will also work for a `data.frame`, which you _should_ be thoroughly documenting in `R/data.R`.
Highlight the name of your `data.frame` and call the addin.```r
#' 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.}
#' }
"iris"
```