Count and Percentage
pn.RdFunctions to display counts and percentages.
Usage
pn(x, digits = 1, na_rm = FALSE, show_denom = FALSE, paren = "(", note = FALSE)
np(x, digits = 1, na_rm = FALSE, show_denom = FALSE, paren = "(")Arguments
- x
A boolean vector
- digits
Number of digits to display percentages to, default is 1
- na_rm
Logical indicating whether NAs should be removed from the calculation of the denominator, default is
FALSE- show_denom
Logical, should the denominator be shown, default is
FALSE- paren
String indicating which parentheses to use, options are
"("(for ()) or"["(for[])- note
Should "n = " preface the count in
pn()