Mask micro data in gtsummary::tbl_summary() tables
Source:R/mask_micro_summary.R
mask_micro_summary.RdMask micro data in gtsummary::tbl_summary() tables
Examples
ls <- gtsummary::trial |> gtsummary::tbl_summary(by=trt)
ls |> mask_micro_summary()
#> Please remember always to double-check your tables before exporting.
#> Error in gtsummary::modify_table_body(data, ~summary_masks(.x, ls = data, cut.off = micro.n, dec = 1)): The following error occured while executing `fun` on `x$table_body`:
#> ✖ ℹ In index: 1. Caused by error in `UseMethod()`: ! no applicable method for
#> 'select' applied to an object of class "NULL"
ls |> gtsummary::add_overall() |> mask_micro_summary()
#> Please remember always to double-check your tables before exporting.
#> Error in gtsummary::modify_table_body(data, ~summary_masks(.x, ls = data, cut.off = micro.n, dec = 1)): The following error occured while executing `fun` on `x$table_body`:
#> ✖ ℹ In index: 1. Caused by error in `UseMethod()`: ! no applicable method for
#> 'select' applied to an object of class "NULL"