All Projects → r-lib → Roxygen2

r-lib / Roxygen2

Licence: other
Generate R package documentation from inline R comments

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Roxygen2

Compodoc
📔 The missing documentation tool for your Angular, Nest & Stencil application
Stars: ✭ 3,567 (+733.41%)
Mutual labels:  documentation, devtools
Devtools
The Hoa\Devtools library.
Stars: ✭ 5 (-98.83%)
Mutual labels:  documentation, devtools
Lucid
A developer tool for engineers working with React and GraphQL.
Stars: ✭ 397 (-7.24%)
Mutual labels:  devtools
Orchid
Build and deploy beautiful documentation sites that grow with you
Stars: ✭ 418 (-2.34%)
Mutual labels:  documentation
Assemble
Community
Stars: ✭ 3,995 (+833.41%)
Mutual labels:  documentation
Standard Readme
A standard style for README files
Stars: ✭ 4,412 (+930.84%)
Mutual labels:  documentation
Docs
Prometheus documentation: content and static site generator
Stars: ✭ 411 (-3.97%)
Mutual labels:  documentation
Tensorflow Docs
TensorFlow 最新官方文档中文版
Stars: ✭ 3,782 (+783.64%)
Mutual labels:  documentation
Shaman
Small, lightweight, api-driven dns server.
Stars: ✭ 426 (-0.47%)
Mutual labels:  devtools
Entitycomponentsystemsamples
No description or website provided.
Stars: ✭ 4,218 (+885.51%)
Mutual labels:  documentation
Cljdoc
📚 A central documentation hub for the Clojure community
Stars: ✭ 416 (-2.8%)
Mutual labels:  documentation
Graphql Docs
Easily generate beautiful documentation from your GraphQL schema.
Stars: ✭ 409 (-4.44%)
Mutual labels:  documentation
Sphinx
Main repository for the Sphinx documentation builder
Stars: ✭ 4,313 (+907.71%)
Mutual labels:  documentation
Documentation
This repository hosts the documentation for 96Boards products and specifications.
Stars: ✭ 416 (-2.8%)
Mutual labels:  documentation
Re Frisk
Take full control of re-frame app
Stars: ✭ 396 (-7.48%)
Mutual labels:  devtools
Documentation
Issue tracker for Plotly's open-source documentation.
Stars: ✭ 424 (-0.93%)
Mutual labels:  documentation
Bad Data Guide
An exhaustive reference to problems seen in real-world data along with suggestions on how to resolve them.
Stars: ✭ 3,862 (+802.34%)
Mutual labels:  documentation
Reference
The Rust Reference
Stars: ✭ 397 (-7.24%)
Mutual labels:  documentation
Mdx Docs
📝 Document and develop React components with MDX and Next.js
Stars: ✭ 412 (-3.74%)
Mutual labels:  documentation
Kubernetes practice
kubernetes实践指南(内容不定期更新中。。。), 欢迎提PR。
Stars: ✭ 428 (+0%)
Mutual labels:  documentation

roxygen2

CRAN status R build status Codecov test coverage

The premise of roxygen2 is simple: describe your functions in comments next to their definitions and roxygen2 will process your source code and comments to automatically generate .Rd files in man/, NAMESPACE, and, if needed, the Collate field in DESCRIPTION.

Installation

# Install devtools from CRAN
install.packages("roxygen2")

# Or the development version from GitHub:
# install.packages("devtools")
devtools::install_github("r-lib/roxygen2")

Usage

The premise of roxygen2 is simple: describe your functions in comments next to their definitions and roxygen2 will process your source code and comments to produce Rd files in the man/ directory. Here's a simple example from the stringr package:

#' The length of a string
#'
#' Technically this returns the number of "code points", in a string. One
#' code point usually corresponds to one character, but not always. For example,
#' an u with a umlaut might be represented as a single character or as the
#' combination a u and an umlaut.
#'
#' @inheritParams str_detect
#' @return A numeric vector giving number of characters (code points) in each
#'    element of the character vector. Missing string have missing length.
#' @seealso [stringi::stri_length()] which this function wraps.
#' @export
#' @examples
#' str_length(letters)
#' str_length(NA)
#' str_length(factor("abc"))
#' str_length(c("i", "like", "programming", NA))
str_length <- function(string) {
}

When you roxygenise() (or devtools::document()) your package these comments will be automatically transformed to the .Rd that R uses to generate the documentation you see when you type ?str_length.

Learn more

To get started, first read vignette("roxygen2"). Then read more about the specific package component that you want to generate:

  • For .Rd documentation files, read vignette("rd").
  • For the NAMESPACE, read vignette("namespace").
  • For the Collate field in the DESCRIPTION, read update_collate().
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].