Tables of predefined sections and types of pieces of Rd objects

Share:

Description

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

Usage

1
2
3
4
5

Details

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

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

These 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

The format of Rdo_predefined_sections is: \Sexpr[stage=build,results=rd]{require(Rdpack); paste( "\\\if{latex}{", "\\\tabular{ll|lll}{", paste(names(Rdo_predefined_sections)[1:5], Rdo_predefined_sections[1:5], " ", names(Rdo_predefined_sections)[-(1:5)], Rdo_predefined_sections[-(1:5)], sep=" \\\tab ", collapse="\\\cr\n"), "}", "}{", "\\\tabular{lllll}{", paste(names(Rdo_predefined_sections)[1:5], Rdo_predefined_sections[1:5], " | ", names(Rdo_predefined_sections)[-(1:5)], Rdo_predefined_sections[-(1:5)], sep=" \\\tab ", collapse="\\\cr\n"), "}", "}" )}

The format of Rdo_piece_types is:

\Sexpr[stage=build,results=rd]{ paste( "\\\if{latex}{", "\\\tabular{ll|ll|ll|ll|ll|ll}{", paste(names(Rdo_piece_types), "\\\tab ", Rdo_piece_types, c(rep("\\\tab ",2),"\\\cr"), sep="", collapse="\n"), "}", "}{", "\\\tabular{llllllllllll}{", paste(names(Rdo_piece_types), "\\\tab ", Rdo_piece_types, c(rep(paste("\\\tab ", "|", sep=""),2), "\\\cr"), sep="", collapse="\n"), "}", "}" )}

The value of rdo_top_tags is:

\Sexpr[stage=build,results=rd]{ paste("\\\tabular{lllll}{", paste(sub("^[\\\]|#", "", rdo_top_tags), c(rep("\\\tab ",4),"\\\cr"), sep="", collapse="\n"), "}")}

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.