Skip to contents

Tables of predefined sections and types of pieces of Rd objects.

Usage

Rdo_predefined_sections

Rdo_piece_types

rdo_top_tags

Details

The Rd syntax defines several tables (Murdoch 2010) . Rdpack stores them in the variables described here.

Rdo_predefined_sections is a named character vector of types of the top level sections of an Rd object.

Rdo_piece_types is a named character vector giving the types of the core (all possible?) Rd macros.

NOTE: These objects are hard coded and need to be updated if the specifications of the Rd format are updated.

todo: write functions that go through existing Rd documentation to discover missing or wrong items.

Value

for Rdo_predefined_sections, the name-value pairs are given in the following table. For example,

Rdo_predefined_sections["examples"] is

RCODE .

nameVERB|descriptionTEXT
aliasVERB|examplesRCODE
conceptTEXT|usageRCODE
docTypeTEXT|RdversionVERB
titleTEXT|synopsisVERB
nameVERB|sectionTEXT
aliasVERB|argumentsTEXT
conceptTEXT|keywordTEXT
docTypeTEXT|noteTEXT
titleTEXT|formatTEXT
nameVERB|sourceTEXT
aliasVERB|detailsTEXT
conceptTEXT|valueTEXT
docTypeTEXT|referencesTEXT
titleTEXT|authorTEXT
nameVERB|seealsoTEXT

for Rdo_piece_types, the name-value pairs are:

nameVERB| aliasVERB| conceptTEXTdocTypeTEXT| titleTEXT| descriptionTEXT
examplesRCODE| usageRCODE| RdversionVERBsynopsisVERB| SexprRCODE| RdOptsVERB
codeRCODE| dontshowRCODE| donttestRCODEtestonlyRCODE| dontrunVERB| envVERB
kbdVERB| optionVERB| outVERBpreformattedVERB| sampVERB| specialVERB
urlVERB| verbVERB| deqnVERBeqnVERB| renewcommandVERB| newcommandVERB

for rdo_top_tags, the values are:

\name\Rdversion\docType\alias\encoding
\concept\title\description\usage\format
\source\arguments\details\value\references
\section\note\author\seealso\examples
\keyword#ifdef#ifndef\newcommand\renewcommand

Note that most, but not all, are prefixed with backaslash.

References

Duncan Murdoch (2010). “Parsing Rd files.” https://developer.r-project.org/parseRd.pdf.