View source: R/helpfunctions_checks.R
| drop_levels | R Documentation |
CHECKS if there are empty factor levels in any of the variables used in the model.
drop_levels(data, allvars, warn = TRUE, mess = NULL)
data |
a |
allvars |
a character vector (of all variable names used in the model) |
warn |
logical, if |
the data.frame (unchanged)
Originally, the function also dropped these levels. Then, I (accidentally?) had commented out a line so that no check was performed. Now, only create a warning if there are empty levels, but do not drop them.
used in model_imp (2020-06-09)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.