Learn R Programming

rlistings (version 0.2.7)

matrix_form,listing_df-method: Transform rtable to a list of matrices which can be used for outputting

Description

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)

Value

a MatrixPrintForm object

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.

See Also

formatters::matrix_form()

Examples

Run this code

lsting <- as_listing(mtcars)
mf <- matrix_form(lsting)

Run the code above in your browser using DataLab