categoricals.data.frame | R Documentation |
Identifies categorical columns: literally, factors. Stacks factor levels and supplies value = 1.
## S3 method for class 'data.frame'
categoricals(x, ..., na.rm_fac = FALSE, exclude_fac = NULL, all_levels = FALSE)
x |
data.frame; names must not start with '_tablet_' |
... |
passed to |
na.rm_fac |
whether to drop NA observations; passed to |
exclude_fac |
which factor levels to exclude; see |
all_levels |
whether to supply records for unobserved levels |
same class as x
example(classifiers)
categoricals(x)
levels(categoricals(x)$`_tablet_level`)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.