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,
other_if_less_than = 0,
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 |
other_if_less_than |
When set to a positive integer, levels with less count than it will be merged into an "Others" 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, other_if_less_than = 5,
na_drop_all = sex)
data
[Package tabxplor version 1.2.0 Index]