Reads the variable descriptions out of the \describe section of a
documented dataset and returns them as a named character vector, the names
being the variable names. This turns documentation that already exists into
labels usable in tables, plots and codebooks, instead of maintaining the
same descriptions a second time in the code.
Details
The Rd database is read with tools::Rd_db() and searched recursively for
the first \describe section, from which all
\item{var}{description} entries are taken. Only that first
section is read: on a page documenting more than one dataset, the labels of
the first one are returned.
Descriptions are returned as written in the Rd file, with whitespace and
line breaks collapsed to single spaces. Rd markup inside a description, such
as \code{} or \eqn{}, contributes its content without the surrounding
command.
The package must be installed, as the documentation is read from the installed Rd database rather than from the sources.
See also
Other pkg.funinfo:
funArgs(),
funCalls(),
funKeywords(),
funList(),
rdTitle()
