Description Usage Arguments Value Examples
Fills missing values of a factor vector by using the majority rule. If there are several levels with the same number of votes, samples one at random and fills the missing values
1 |
x |
A factor vector possibly containing missing values. |
A factor vector of the same length as x
but without missing
values.
1 2 3 | x <- as.factor(c(1,1,2,2,3,3,3))
x[3] <- NA
impute_factor(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.