document

Generate Documentation for an R Package

Description

Main function for tinyrox. Parses R source files for documentation comments and generates Rd files and NAMESPACE.

Usage

document(
  path = ".",
  namespace = c("overwrite", "append", "none"),
  cran_check = TRUE
)

Arguments

  • path: Path to package root directory. Default is current directory.
  • namespace: How to handle NAMESPACE generation. One of
  • “overwrite”: Fully regenerate NAMESPACE (default)
  • “append”: Insert between ## tinyrox start/end markers
  • “none”: Don’t modify NAMESPACE
  • cran_check: Run CRAN compliance checks (DESCRIPTION quoting, web service links, code issues, missing examples). Default TRUE.

Value

Invisibly returns a list with:

  • rd_files: character vector of generated Rd file paths
  • namespace: path to NAMESPACE file (or NULL if mode=“none”)

Examples

# Document current package
document()

# Document with append mode for NAMESPACE
document(namespace = "append")

# Document without modifying NAMESPACE
document(namespace = "none")

# Skip CRAN compliance check
document(cran_check = FALSE)