A table object carries the data and statistics it was built from, so it can
become large. tbl_butcher() removes every element except those required to
print the table. Functions that add information or modify the table, such as
add_global_p(), no longer run on the butchered object; most
inline_text() calls continue to work.
Usage
tbl_butcher(x, include = c("table_body", "table_styling"))See also
Other advanced modifiers:
modify_bold_italic,
modify_column_alignment(),
modify_column_hide(),
modify_column_merge(),
modify_fmt_fun(),
modify_indent(),
modify_missing_symbol(),
modify_post_fmt_fun()
Examples
tbl_large <- tbl_uvregression(trial, y = age, method = lm)
tbl_butchered <- tbl_butcher(tbl_large)
# size comparison
object.size(tbl_large) |> format(units = "Kb")
#> [1] "5901.2 Kb"
object.size(tbl_butchered) |> format(units = "Kb")
#> [1] "1657.6 Kb"