cont_long_fun.Rd
Function for continuous long summaries
cont_long_fun(
value,
digit_fun = sig,
id = NULL,
digits = 3,
na_fill = "--",
...
)
the data to summarize
a function to format digits in the summaries
a vector of subject IDs; same length as value
the number of digits in the summary; the current implementation
passes digits
to digit_fun()
value to fill with when all values in the summary are missing
not used
The function returns a tibble with one row and five columns:
n
the number of non-missing observations in value
Mean
the mean of value
Median
the median of value
SD
the standard deviation of value
Min / Max
the range of value
All columns are returned as character
.
pmtables:::cont_long_fun(rnorm(100))
#> # A tibble: 1 × 5
#> n Mean Median SD `Min / Max`
#> <chr> <chr> <chr> <chr> <chr>
#> 1 100 0.108 0.0472 0.928 -2.02 / 2.71