You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
prune_empty_level_but_any <- function (tt) {
# If the output of this function is TRUE the row or split will be pruned
if (is(tt, "TableRow")) { # label and data rows
# browser() to check when to avoid doing this
if (obj_name(tt) == "Any") {
return(FALSE)
} else {
return(all_zero_or_na(tt))
}
}
if (content_all_zeros_nas(tt)) { # content rows
return(TRUE)
}
kids <- tree_children(tt)
length(kids) == 0 # entire splits with no children remaining are pruned
}
result %>% prune_table(prune_func = prune_empty_level_but_any)
The text was updated successfully, but these errors were encountered:
Use something like that in postprocessing:
The text was updated successfully, but these errors were encountered: