Description Usage Arguments Value Examples
Create count with proportion as string
1 2 3 | str_comb_prop(x, category = NULL, na.rm = T, digits = 1,
out = c("percentage", "percent"), perc.disp = F, escape = F,
zero2dash = T)
|
x |
vector |
category |
Category to count x matches (not required if x logical) |
digits |
number of digits to round |
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 ( % )"
1 2 3 4 5 | x = sample(1:3, size = 20, replace = T)
str_comb_prop(x, category = 2,digits = 3)
str_comb_prop(x, category = 1, out = "percent")
str_comb_prop(x == 1)
str_comb_prop(x %in% 1:3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.