Extract all the missing values in a factor variable and turn them into a separate category.
NAtoCategory(fact, label = "missing")
Label to be given to the missing valus.
Updated factor variable.
Kaspar Rufibach (maintainer), email@example.com, http://www.kasparrufibach.ch
fact <- factor(sample(c(round(runif(10, 1, 3)), rep(NA, 10))), levels = 1:3,
labels = c("no", "maybe", "yes"))
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.
Questions? Problems? Suggestions? Tweet to @rdrrHQian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.