documenter"

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Overview

It is sometimes necessary to document all the files in a directory. Using the function document_it, all files can quickly and thoroughly be aggregated automatically into a double spaced document. By creating an annotation file, additional comments can be added for each file without additional intervention.

Usage

The package can be loaded via the library function.

# Load the package.
library(documenter)

The function document_it accepts 3 arguments:

An example use case is provided below. This documents all files in the "example" folder within the documenter package directory. Note that this is a recursive operation. Thus, all files contained within subdirectories of the folder will also be documented. Note that the output generated by this example is written to a folder in the temporary directory.

input <- system.file("extdata", "example", package = "documenter")
document_it(
  input_directory = input,
  output_file = file.path(tempdir(), "documentation"),
  annotation_file = NULL
)

Disclaimer

The views expressed are those of the author(s) and do not reflect the official policy of the Department of the Army, the Department of Defense or the U.S. Government.



Try the documenter package in your browser

Any scripts or data that you put into this service are public.

documenter documentation built on Jan. 5, 2023, 5:11 p.m.