powered by
Reporting helper function: computes and formats the relative percentage of a count.
rep_sum_pct( count, count_reference, digits = 2, na.rm = TRUE, brackets = c("round", "square"), suffix = TRUE )
A character with the formatted output.
A numeric. The numerator.
A numeric. The denominator.
An integer indicating the number of decimal places.
A logical indicating if missings should be removed from x before computing the distributional parameters (default: TRUE).
x
TRUE
A character. Either "round" (default) or "square" to indicate the type of brackets to surround the relative count.
"round"
"square"
A character which is placed between the lower and the upper confidence bound in the formatted output.
stats::median, stats::quantile, Hmisc::wtd.quantile()
Hmisc::wtd.quantile()
rep_sum_pct(count = 40, count_reference = 200) rep_sum_pct(count = 40, count_reference = 200, brackets = "square") rep_sum_pct(40, 200, brackets = "square", suffix = FALSE)
Run the code above in your browser using DataLab