View source: R/general_funcs.R
prop.yes | R Documentation |
get percentage of positive answers in a vector
prop.yes( x, cutoff = 1, round = T, digits = 2L, restrict = F, restrict_level = 10L )
x |
a vector |
cutoff |
a vector defining positive answers, default = 1 in a binary dataset |
round |
TRUE/FALSE, default = T |
digits |
no. of digits to round, default = 2 |
restrict |
should answers be restricted to 'NA' when n < 10 'NA', default F |
restrict_level |
the number of answers for restriction: if n is below restrict level, answer is turned to NA |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.