Transform rtable to a list of matrices which can be used for outputting
Source:R/rlistings.R
matrix_form-listing_df-method.Rd
Although rtables are represented as a tree data structure when outputting the table to ASCII or HTML it is useful to map the rtable to an in between state with the formatted cells in a matrix form.
Usage
# S4 method for listing_df
matrix_form(obj, indent_rownames = FALSE)
Arguments
- obj
ANY. Object to be transformed into a ready-to-render form (a MatrixPrintForm object)
- indent_rownames
logical(1). Silently ignored, as listings do not have row names nor indenting structure.
Details
The strings in the return object are defined as follows: row labels are those determined by summarize_rows
and
cell values are determined using get_formatted_cells
.
(Column labels are calculated using a non-exported internal function.
Examples
lsting <- as_listing(mtcars)
#> sorting incoming data by key columns
mf <- matrix_form(lsting)