Skip to contents

Mask micro data in gtsummary::tbl_summary() tables

Usage

mask_micro_summary(data, micro.n = 5)

Arguments

data

gtsummary summary table

micro.n

n to mask at. Passed on.

Value

list

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"