View source: R/validate_table_struct.R
sanitize_table_struct | R Documentation |
Experimental function to correct structure of degenerate tables by adding messaging rows to empty sub-structures.
sanitize_table_struct(tt, empty_msg = "-- This Section Contains No Data --")
tt |
|
empty_msg |
character(1). The string which should be spanned across the inserted empty rows. |
This function locates degenerate portions of the table (including the table
overall in the case of a table with no data rows) and inserts a row
which spans all columns with the message empty_msg
at each one,
generating a table guaranteed to be non-degenerate.
If tt
is already valid, it is returned unmodified. If tt
is
degenerate, a modified, non-degenerate version of the table is returned.
sanitize_table_struct(rtable("cool beans"))
lyt <- basic_table() %>%
split_cols_by("ARM") %>%
split_rows_by("SEX") %>%
summarize_row_groups()
## Degenerate because it doesn't have any analyze calls -> no data rows
badtab <- build_table(lyt, DM)
sanitize_table_struct(badtab)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.