na.roughfix {randomForest} | R Documentation |
Impute Missing Values by median/mode.
na.roughfix(object, ...)
object |
a data frame or numeric matrix. |
... |
further arguments special methods could require. |
A completed data matrix or data frame. For numeric variables,
NA
s are replaced with column medians. For factor variables,
NA
s are replaced with the most frequent levels (breaking ties
at random). If object
contains no NA
s, it is returned
unaltered.
Andy Liaw