MyNixOS website logo
Description

Minimal R Documentation Generator.

A deterministic, dependency-free documentation generator for R packages. Generates valid Rd files and NAMESPACE from 'roxygen2'-style comments using only base R. Supports a strict subset of tags with no markdown parsing, no inference magic, and explicit-only behavior.

tinyrox

Minimal R documentation generator - base R only, no magic.

What it does

tinyrox is a lightweight alternative to roxygen2 that generates valid .Rd files and NAMESPACE from #' comments using only base R.

Installation

install.packages("tinyrox")

Usage

library(tinyrox)

# Generate man/*.Rd and NAMESPACE from R/*.R
document()

# Clean generated files (man/, NAMESPACE)
clean()

# Check for common CRAN policy issues
check_cran()

Supported Tags

Documentation

TagPurpose
@titleOne-line title
@descriptionShort description
@detailsLonger description
@param nameParameter documentation
@returnReturn value
@valueAlias for @return
@examplesCode examples (verbatim)
@example pathInclude example from file
@seealsoCross-references
@referencesCitations
@section Title:Custom section
@authorAuthor information
@family nameRelated functions
@aliasesAdditional topic aliases
@keywordsRd keywords (e.g., internal)
@nameExplicit topic name
@inheritParams fnCopy params from another function
@noRdSkip Rd generation

Namespace

TagEffect
@exportexport()
@exportS3Method generic classS3method()
@import pkgimport()
@importFrom pkg sym1 sym2importFrom()
@useDynLib pkguseDynLib()

Example

#' Add Two Numbers
#'
#' @param x First number
#' @param y Second number
#' @return The sum
#' @export
#'
#' @examples
#' add(1, 2)
add <- function(x, y) {
  x + y
}

CRAN Compliance Checking

tinyrox includes automated CRAN compliance checks:

# Check DESCRIPTION for common issues
check_description_cran()
# Warns about: unquoted package names, missing web service links

# Check R code for CRAN policy violations
check_code_cran()
# Warns about: T/F, print()/cat(), .GlobalEnv, installed.packages(), etc.

# Run all checks
check_cran()

# Auto-fix DESCRIPTION quoting issues
fix_description_cran()

Issues detected:

  • Unquoted package/software names in Title/Description
  • Missing web service links for packages like hfhub, gh
  • T/F instead of TRUE/FALSE
  • print()/cat() instead of message()
  • installed.packages() usage
  • .GlobalEnv modifications
  • setwd() without on.exit() restoration
  • Hardcoded set.seed() without parameter

Philosophy

tinyrox follows the tinyverse philosophy:

Dependencies have real costs. Each dependency is an invitation to break your project.

Design principles:

  • Minimize dependencies (tinyrox has none)
  • Explicit over implicit - no inference magic
  • Strict subset of tags - not everything roxygen2 does
  • Deterministic output - same input = same output
  • Fail fast on unknown tags

What tinyrox does NOT do:

  • Markdown parsing
  • Automatic dependency inference
  • @rdname grouping magic
  • pkgdown integration

Development Workflow

tinyrox is part of the tinyverse toolchain for R package development:

PackagePurpose
tinyroxDocumentation & NAMESPACE
tinypkgrinstall, load_all, check, build
tinytestUnit testing
rformatToken-based code formatter
# Edit R/*.R files with #' comments

# Regenerate docs
tinyrox::document()

# Load for interactive development (no install)
tinypkgr::load_all()

# Install and reload in current session
tinypkgr::reload()
tinytest::test_package("mypkg")

# Full R CMD check
tinypkgr::check()

Or from the command line with littler:

r -e 'tinyrox::document(); tinypkgr::install(); tinytest::test_package("mypkg")'

License

GPL-3

Metadata

Version

0.3.3

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows