Function for continuous long summaries

cont_long_fun(value, digit_fun = sig, digits = 3, na_fill = "--", ...)

Arguments

value

the data to summarize

digit_fun

a function to format digits in the summaries

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

The function returns a tibble with one row and five columns:

  1. n the number of non-missing observations in value

  2. Mean the mean of value

  3. Median the median of value

  4. SD the standard deviation of value

  5. Min / Max the range of value

All columns are returned as character.

Examples

pmtables:::cont_long_fun(rnorm(100))
#> # A tibble: 1 × 5
#>   n     Mean   Median SD    `Min / Max` 
#>   <chr> <chr>  <chr>  <chr> <chr>       
#> 1 100   0.0708 0.0910 1.05  -2.61 / 2.76