| Title: | A Tiny 'Roxygen'-Style Documentation Generator |
| Version: | 0.1 |
| Description: | A minimalistic, dependency-free alternative to 'roxygen2'. Reads '#” comment blocks above R functions and objects and turns them into '.Rd' documentation files and a 'NAMESPACE' file. 'tinyroxygen' is to 'roxygen2' what 'tinytest' is to 'testthat', a lightweight alternative built with base R only, with no recursive dependencies to install. 'Roxygen' stands for R documentation inspired by the 'Doxygen' for 'C++' documentation tools. |
| License: | Apache License 2.0 |
| Depends: | R (≥ 4.1.0) |
| Encoding: | UTF-8 |
| RoxygenNote: | 8.0.0 |
| NeedsCompilation: | yes |
| Copyright: | See file LICENSE.note for the license of the bundled 'cmark' library used for Markdown support. |
| Packaged: | 2026-07-28 14:00:43 UTC; pacha |
| Author: | Mauricio Vargas Sepulveda
|
| Maintainer: | Mauricio Vargas Sepulveda <m.vargas.sepulveda@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-08-06 13:20:02 UTC |
tinyroxygen: a tiny 'roxygen'-style documentation generator
Description
Reads '#” comment blocks above R functions and objects and turns them into '.Rd' documentation files and a 'NAMESPACE' file, using base R only. It is a minimal, non-magical alternative to 'roxygen2' for situations where installing 'roxygen2' and its dependencies is impractical (e.g. slow or restricted institutional servers).
Update DESCRIPTION Imports and Suggests fields
Description
Scan R code in the package directories to identify used packages and update the 'Imports' and 'Suggests' fields in the 'DESCRIPTION' file. Packages found in 'dir.r' go to 'Imports'; packages found only in 'dir.v' or 'dir.t' go to 'Suggests'. Detects 'pkg::fun()', '@importFrom pkg fun', 'library(pkg)', and 'require(pkg)' patterns. Uses only 'read.dcf'/'write.dcf' from base R, so it does not require installing the 'desc' package or any of its dependencies.
Usage
description_update(
pkgdir = ".",
dir.r = "R",
dir.v = "vignettes",
dir.t = "tests",
extra_suggests = NULL,
pkg_ignore = NULL
)
Arguments
pkgdir |
The path to the package directory. Defaults to the current directory. |
dir.r |
Directory with R scripts (Imports). Defaults to 'R'. |
dir.v |
Vignettes directory (Suggests). Set to ” to skip. |
dir.t |
Tests directory (Suggests). Set to ” to skip. |
extra_suggests |
Character vector of extra packages to add to Suggests. |
pkg_ignore |
Character vector of package names to exclude from both fields. |
Value
Invisibly returns the path to the 'DESCRIPTION' file.
Generate documentation from roxygen comments
Description
Parses the '#” comment blocks in the 'R/' directory of a package, writes the corresponding '.Rd' files to 'man/', and writes a 'NAMESPACE' file based on '@export' and related tags.
Usage
roxygenise(pkgdir = NULL)
Arguments
pkgdir |
Path to the package directory. Defaults to |
Value
Invisibly returns the package directory.
Examples
## Not run:
roxygenise("path/to/package")
## End(Not run)