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

1document(
2  path = ".",
3  namespace = c("overwrite", "append", "none"),
4  cran_check = TRUE
5)

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

 1# Document current package
 2document()
 3
 4# Document with append mode for NAMESPACE
 5document(namespace = "append")
 6
 7# Document without modifying NAMESPACE
 8document(namespace = "none")
 9
10# Skip CRAN compliance check
11document(cran_check = FALSE)