Description Usage Arguments Value
View source: R/compute_quant.R
compute_cat
takes an indicator variable and returns either the
proportion or count of TRUE values.
1 | compute_cat(x, prop = F, na.rm = T, digits = 3)
|
x |
a vector containing entries for the indicator variable (either TRUE/FALSE or 1/0). |
prop |
a logical. If TRUE, then a proportion is returned. If FALSE, then a count is returned. |
na.rm |
a logical. If TRUE, then NA values are removed. |
digits |
an integer specifying the number of significant digits to report. |
a scalar containing the count or proportion.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.