tab_prepare {tabxplor} | R Documentation |
Prepare data for tab_plain
.
Description
Prepare data for tab_plain
.
Usage
tab_prepare(
data,
...,
na_drop_all,
cleannames = NULL,
rare_to_other = FALSE,
n_min = 30,
other_level = "Others"
)
Arguments
data |
A dataframe. |
... |
Variables then to be passed in |
na_drop_all |
<tidy-select> Removes all
observation with a |
cleannames |
Set to |
rare_to_other |
When set to |
n_min |
The count under which a level is aggregated in the "Other" level. |
other_level |
The name of the "Other" level, as a character vector of length one. |
Value
A modified data.frame.
Examples
data <- dplyr::starwars %>%
tab_prepare(sex, hair_color, gender, rare_to_other = TRUE,
n_min = 5, na_drop_all = sex)
data
[Package tabxplor version 1.1.3 Index]