Function for continuous wide summaries

cont_wide_fun(
  value,
  digit_fun = sig,
  id = NULL,
  digits = 3,
  na_fill = "--",
  ...
)

Arguments

value

the data to summarize

digit_fun

a function to format digits in the summaries

id

a vector of subject IDs; same length as value

digits

the number of digits in the summary; the current implementation passes digits to digit_fun()

na_fill

value to fill with when all values in the summary are missing

...

not used

Value

A tibble with one row and one column named summary; the summary has this format: mean (sd) [count] for all non-missing data in value.

Examples

pmtables:::cont_wide_fun(rnorm(100))
#> # A tibble: 1 × 1
#>   summary             
#>   <chr>               
#> 1 0.0493 (0.970) [100]