rep_sum_pct {kdry}R Documentation

rep_sum_pct

Description

Reporting helper function: computes and formats the relative percentage of a count.

Usage

rep_sum_pct(
  count,
  count_reference,
  digits = 2,
  na.rm = TRUE,
  brackets = c("round", "square"),
  suffix = TRUE
)

Arguments

count

A numeric. The numerator.

count_reference

A numeric. The denominator.

digits

An integer indicating the number of decimal places.

na.rm

A logical indicating if missings should be removed from x before computing the distributional parameters (default: TRUE).

brackets

A character. Either "round" (default) or "square" to indicate the type of brackets to surround the relative count.

suffix

A character which is placed between the lower and the upper confidence bound in the formatted output.

Value

A character with the formatted output.

See Also

stats::median, stats::quantile, Hmisc::wtd.quantile()

Examples

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)


[Package kdry version 0.0.2 Index]