Description Usage Arguments Value Author(s) See Also Examples
Impute missing values in a specified column of a data frame or a numerical matrix with three simple methods
1 | impute_missing(dfm, col, method, missing_val_char)
|
dfm |
A data frame or a numerical matrix |
col |
A string of column name, if the input data is a matrix, this should be a string like "Vn" where n is an integer representing the index of column |
method |
A string of a method name, should be one of "CC", "MIP" and "DIP" |
missing_val_char |
A string of a missing value format, should be one of NA, NaN, "" and "?" |
A data frame having no missing values in the specified column
Linsey Yao, March 2018
na.omit
for the complete case
Other aggregate functions: compare_model
1 2 | impute_missing(data.frame(ex = c(1, 2, 3), bf = c(6, 8, "")), "bf", "DIP", "")
impute_missing(matrix(c(1,2,3, 6,8,NA), nrow = 3, ncol = 2, byrow = FALSE), "V2", "DIP", NA)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.