tab_prepare | R Documentation |
tab_plain
.Prepare data for tab_plain
.
tab_prepare(
data,
...,
na_drop_all,
cleannames = NULL,
other_if_less_than = 0,
other_level = "Others"
)
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. |
A modified data.frame.
data <- dplyr::starwars %>%
tab_prepare(sex, hair_color, gender, other_if_less_than = 5,
na_drop_all = sex)
data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.