Build a reference index from a package’s Rd files

Description

Parses every man/*.Rd file under path and returns, for each documented alias, its usage, a one-line summary, and the topic it’s documented on.

Usage

build_topic_index(path = ".", quiet = FALSE)

Arguments

path Path to the package root (must contain a man/ directory).
quiet Logical. Suppress the warnings issued when a \usage{} block couldn’t be narrowed to one alias, or when a tooltip brief had to be truncated mid-word.

Details

When an Rd page documents several aliases (e.g. an S3 generic and its methods), its \usage{} block is split on blank lines and each alias is matched to the block whose call starts with that alias’s name. An alias with no matching block falls back to the whole \usage{} text, with a warning.

Value

A named list, one entry per alias, each holding usage, brief (character or NULL), and topic.