categoricals.data.frame {tablet} | R Documentation |
Identify Categoricals for Data Frame
Description
Identifies categorical columns: literally, factors. Stacks factor levels and supplies value = 1.
Usage
## S3 method for class 'data.frame'
categoricals(x, ..., na.rm_fac = FALSE, exclude_fac = NULL, all_levels = FALSE)
Arguments
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 |
Value
same class as x
Examples
example(classifiers)
categoricals(x)
levels(categoricals(x)$`_tablet_level`)
[Package tablet version 0.6.12 Index]