{"id":14068584,"url":"https://github.com/r-lib/roxygen2","last_synced_at":"2025-12-12T01:04:59.656Z","repository":{"id":1508603,"uuid":"1765057","full_name":"r-lib/roxygen2","owner":"r-lib","description":"Generate R package documentation from inline R comments","archived":false,"fork":false,"pushed_at":"2024-08-02T12:25:04.000Z","size":17567,"stargazers_count":610,"open_issues_count":168,"forks_count":232,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-04-13T22:18:22.297Z","etag":null,"topics":["devtools","documentation","r"],"latest_commit_sha":null,"homepage":"https://roxygen2.r-lib.org","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r-lib.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-05-18T08:23:27.000Z","updated_at":"2025-04-07T19:00:03.000Z","dependencies_parsed_at":"2023-07-06T05:56:56.126Z","dependency_job_id":"68c358e2-681d-4470-876c-4bd33cb41bc8","html_url":"https://github.com/r-lib/roxygen2","commit_stats":{"total_commits":2479,"total_committers":124,"mean_commits":"19.991935483870968","dds":0.4897135941912061,"last_synced_commit":"c03a6711eea3f7dc16e55f0ab0babac9ff40d9ea"},"previous_names":["klutometis/roxygen"],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Froxygen2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Froxygen2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Froxygen2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Froxygen2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r-lib","download_url":"https://codeload.github.com/r-lib/roxygen2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248788985,"owners_count":21161759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devtools","documentation","r"],"created_at":"2024-08-13T07:06:17.488Z","updated_at":"2025-12-12T01:04:54.613Z","avatar_url":"https://github.com/r-lib.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# roxygen2 \u003ca href=\"https://roxygen2.r-lib.org\"\u003e\u003cimg src=\"man/figures/logo.png\" align=\"right\" height=\"138\" alt=\"roxygen2 website\" /\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/roxygen2)](https://CRAN.R-project.org/package=roxygen2)\n[![R-CMD-check](https://github.com/r-lib/roxygen2/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/roxygen2/actions/workflows/R-CMD-check.yaml)\n[![Codecov test coverage](https://codecov.io/gh/r-lib/roxygen2/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-lib/roxygen2?branch=main)\n\u003c!-- badges: end --\u003e\n\nThe 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`.\n\n## Installation \n\n```R\n# Install roxygen2 from CRAN\ninstall.packages(\"roxygen2\")\n\n# Or the development version from GitHub:\n# install.packages(\"pak\")\npak::pak(\"r-lib/roxygen2\")\n```\n\n## Usage\n\nThe 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](https://stringr.tidyverse.org/reference/str_length.html) from the stringr package:\n\n```R\n#' The length of a string\n#'\n#' Technically this returns the number of \"code points\", in a string. One\n#' code point usually corresponds to one character, but not always. For example,\n#' an u with a umlaut might be represented as a single character or as the\n#' combination a u and an umlaut.\n#'\n#' @inheritParams str_detect\n#' @return A numeric vector giving number of characters (code points) in each\n#'    element of the character vector. Missing string have missing length.\n#' @seealso [stringi::stri_length()] which this function wraps.\n#' @export\n#' @examples\n#' str_length(letters)\n#' str_length(NA)\n#' str_length(factor(\"abc\"))\n#' str_length(c(\"i\", \"like\", \"programming\", NA))\nstr_length \u003c- function(string) {\n}\n```\n\nWhen 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`. \n\n## Learn more\n\nTo get started, first read `vignette(\"roxygen2\")`. Then read more about the specific package component that you want to generate:\n\n* Start with `vignette(\"rd\")` to learn how document your functions with roxygen2.\n\n* `vignette(\"rd-other\")` discusses how to document other things like datasets, the package itself, and the various pieces used by R's OOP systems.\n\n* `vignette(\"rd-formatting\")` gives the details of roxygen2's rmarkdown support.\n\n* `vignette(\"reuse\")` demonstrates the tools available to reuse documentation in multiple places.\n\n* `vignette(\"namespace\")` describes how to generate a `NAMESPACE` file, how namespacing works in R, and how you can use roxygen2 to be specific about what your package needs and supplies.\n\n* For the `Collate` field in the `DESCRIPTION`, see `?update_collate()`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-lib%2Froxygen2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr-lib%2Froxygen2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-lib%2Froxygen2/lists"}