sanitize_table_struct {rtables} | R Documentation |
Sanitize degenerate table structures
Description
Experimental function to correct structure of degenerate tables by adding messaging rows to empty sub-structures.
Usage
sanitize_table_struct(tt, empty_msg = "-- This Section Contains No Data --")
Arguments
tt |
( |
empty_msg |
( |
Details
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.
Value
If tt
is already valid, it is returned unmodified. If tt
is degenerate, a modified, non-degenerate
version of the table is returned.
See Also
Other table structure validation functions:
find_degen_struct()
,
validate_table_struct()
Examples
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)
[Package rtables version 0.6.9 Index]