Description Usage Arguments Details Value Examples
cpf
produces a frequency table by the specified variables, which should be categorical and of relatively low cardinality.
1 2 3 4 5 6 7 8 9 10 11 | cpf_(data, ..., .dots, wt = NULL, sort = TRUE, margin = TRUE,
chi_square = FALSE, kable = FALSE)
cpf(data, ..., wt = NULL, sort = TRUE, margin = TRUE,
chi_square = FALSE, kable = FALSE)
has(data, ..., wt = NULL, sort = TRUE, margin = TRUE,
chi_square = FALSE, kable = FALSE)
has_(data, ..., .dots, wt = NULL, sort = TRUE, margin = TRUE,
chi_square = FALSE, kable = FALSE)
|
data |
A dataframe. |
... |
Variable names defining table groupings. |
.dots |
Vector of variable names defining table groupings. |
wt |
(Optional, character) variable name to use for weighting frequencies. |
sort |
Logical, whether to sort table in descending frequency. Setting to |
margin |
Logical, whether to add total row to end of table. |
chi_square |
Logical, whether to print chi-square test (has no effect on one-dimensional tables). |
kable |
Logical, whether to format table for Rmarkdown. |
has
is a wrapper around cpf
for the common pattern of counting the number of NA
and non-NA
values in each specified variable. It is equivalent to cpf(data, !is.na(x), !is.na(y), ...)
.
A dataframe or kable
.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.