summ_prop | R Documentation |
Create count with proportion as string
summ_prop(
x,
category = NULL,
omit_na = T,
digits = 1,
incl_denom = F,
out = c("percentage", "percent"),
perc_disp = F,
escape = F,
zero2dash = T
)
x |
vector |
category |
Category to count x matches (not required if x logical) |
omit_na |
logical for removal of missing values when reporting porportion |
digits |
number of digits to round |
incl_denom |
logical for inclusion of denominator in frequency |
out |
single character representing output for proportion |
perc_disp |
logical for inclusion of % sign |
escape |
logical for inclusion of escape character for LaTeX tables |
zero2dash |
logical for returning "-" instead of "0 (0)" for tables |
Character String of the form "N ( % )"
x = sample(1:3, size = 20, replace = T)
summ_prop(x, category = 2,digits = 3)
summ_prop(x, category = 1, out = "percent")
summ_prop(x == 1)
summ_prop(x %in% 1:3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.