TableTree
classes
Table Constructors and Classes
Usage
ElementaryTable(
kids = list(),
name = "",
lev = 1L,
label = "",
labelrow = LabelRow(lev = lev, label = label, vis = !isTRUE(iscontent) && !is.na(label)
&& nzchar(label)),
rspans = data.frame(),
cinfo = NULL,
iscontent = NA,
var = NA_character_,
format = NULL,
na_str = NA_character_,
indent_mod = 0L,
title = "",
subtitles = character(),
main_footer = character(),
prov_footer = character(),
hsep = default_hsep(),
trailing_sep = NA_character_,
inset = 0L
)
TableTree(
kids = list(),
name = if (!is.na(var)) var else "",
cont = EmptyElTable,
lev = 1L,
label = name,
labelrow = LabelRow(lev = lev, label = label, vis = nrow(cont) == 0 && !is.na(label) &&
nzchar(label)),
rspans = data.frame(),
iscontent = NA,
var = NA_character_,
cinfo = NULL,
format = NULL,
na_str = NA_character_,
indent_mod = 0L,
title = "",
subtitles = character(),
main_footer = character(),
prov_footer = character(),
page_title = NA_character_,
hsep = default_hsep(),
trailing_sep = NA_character_,
inset = 0L
)
Arguments
- kids
list. List of direct children.
- name
character(1). Name of the split/table/row being created. Defaults to same as the corresponding label, but is not required to be.
- lev
integer. Nesting level (roughly, indentation level in practical terms).
- label
character(1). A label (not to be confused with the name) for the object/structure.
- labelrow
LabelRow
. TheLabelRow
object to assign to this Table. Constructed fromlabel
by default if not specified.- rspans
data.frame. Currently stored but otherwise ignored.
- cinfo
InstantiatedColumnInfo
(or NULL). Column structure for the object being created.- iscontent
logical. Is the
TableTree
/ElementaryTable
being constructed the content table for anotherTableTree
.- var
string, variable name
- format
FormatSpec
. Format associated with this split. Formats can be declared via strings ("xx.x"
) or function. In cases such asanalyze
calls, they can character vectors or lists of functions.- na_str
character(1). String that should be displayed when the value of
x
is missing. Defaults to"NA"
.- indent_mod
numeric. Modifier for the default indent position for the structure created by this function(subtable, content table, or row) and all of that structure's children. Defaults to 0, which corresponds to the unmodified default behavior.
- title
character(1). Main title (
main_title()
) is a single string. Ignored for subtables.- subtitles
character. Subtitles (
subtitles()
) can be vector of strings, where every element is printed in a separate line. Ignored for subtables.- main_footer
character. Main global (non-referential) footer materials (
main_footer()
). If it is a vector of strings, they will be printed on separate lines.- prov_footer
character. Provenance-related global footer materials (
prov_footer()
). It can be also a vector of strings, printed on different lines. Generally should not be modified by hand.- hsep
character(1). Set of character(s) to be repeated as the separator between the header and body of the table when rendered as text. Defaults to a connected horizontal line (unicode 2014) in locals that use a UTF charset, and to
-
elsewhere (with a once per session warning).- trailing_sep
character(1). String which will be used as a section divider after the printing of the last row contained in this (sub)-table, unless that row is also the last table row to be printed overall, or
NA_character_
for none (the default). When generated via layouting, this would correspond to thesection_div
of the split under which this table represents a single facet.- inset
numeric(1). Number of spaces to inset the table header, table body, referential footnotes, and main_footer, as compared to alignment of title, subtitle, and provenance footer. Defaults to 0 (no inset).
- cont
ElementaryTable
. Content table.- page_title
character. Page specific title(s).