R/matrix_form.R
MatrixPrintForm.Rd
This should generally only be called by `matrix_form` custom methods, and almost never from other code.
MatrixPrintForm(
strings = NULL,
spans,
aligns,
formats,
row_info,
line_grouping = seq_len(NROW(strings)),
ref_fnotes = list(),
nlines_header,
nrow_header,
has_topleft = TRUE,
has_rowlabs = has_topleft,
expand_newlines = TRUE,
main_title = "",
subtitles = character(),
page_titles = character(),
main_footer = "",
prov_footer = character(),
col_gap = 3
)
matrix_print_form(
strings = NULL,
spans,
aligns,
formats,
row_info,
line_grouping = seq_len(NROW(strings)),
ref_fnotes = list(),
nlines_header,
nrow_header,
has_topleft = TRUE,
has_rowlabs = has_topleft,
expand_newlines = TRUE,
main_title = "",
subtitles = character(),
page_titles = character(),
main_footer = "",
prov_footer = character(),
col_gap = 3
)
character matrix. Matrix of formatted, ready to display strings organized as they will be positioned when rendered. Elements that span more than one column must be followed by the correct number of placeholders (typically either empty strings or repeats of the value).
numeric matrix. Matrix of same dimension as
strings
giving the spanning information for each
element. Must be repeated to match placeholders in
strings
.
character matrix. Matrix of same dimension as
strings
giving the text alignment information for each
element. Must be repeated to match placeholders in
strings
.
matrix. Matrix of same dimension
as strings
giving the text format information for
each element. Must be repeated to match placeholders in
strings
.
data.frame. Data.frame with row-information necessary for pagination (XXX document exactly what that is).
integer. Sequence of integers indicating how
print lines correspond to semantic rows in the object.
Typically this should not be set manually unless
expact_newlines is set to FALSE
.
list. Referential footnote information if applicable.
numeric(1). Number of lines taken up by the values of the header (ie not including the divider).
numeric(1). Number of rows corresponding to the header.
logical(1). Does the corresponding table have
'top left information' which should be treated differently when
expanding newlines. Ignored if expand_newlines
is
FALSE
.
logical(1). Do the matrices (strings
,
spans
, aligns
) each contain a column that
corresponds with row labels (Rather than with table cell
values). Defaults to TRUE
.
logical(1). Should the matrix form generated
expand rows whose values contain newlines into multiple
'physical' rows (as they will appear when rendered into
ASCII). Defaults to TRUE
character(1). Main title as a string.
character. Subtitles, as a character vector.
character. Page-specific titles, as a character vector.
character(1). Main footer as a string.
character. Provenance footer information as a character vector.
numeric(1). Space (in characters) between columns
An object of class `MatrixPrintForm`. Currently this is implemented as an S3 class inheriting from list with the following elements:
strings
see argument
spans
see argument
aligns
see argument
display
logical matrix of same dimension as `strings` that specifies whether an element in `strings` will be displayed when the table is rendered
formats
see arugment
row_info
see argument
line_grouping
see argument
ref_footnotes
see argument
main_title
see argument
subtitles
see argument
page_titles
see argument
main_footer
see argument
prov_footer
see argument
as well as the following attributes:
nlines_header
see argument
nrow_header
see argument
ncols
number of columns of the table, not including any row names/row labels