naive_fill_NA
function for the simple and automatic imputationR/naive_fill_NA.R
naive_fill_NA.Rd
Automatically fill the missing data with a simple imputation method, impute with sampling the non missing values. It is recommended to use this function for each categorical variable separately.
naive_fill_NA(x)
# S3 method for data.frame
naive_fill_NA(x)
# S3 method for data.table
naive_fill_NA(x)
# S3 method for matrix
naive_fill_NA(x)
a numeric matrix or data.frame/data.table (factor/character/numeric/logical variables)
object with a similar structure to the input but without missing values.
naive_fill_NA(data.frame)
: S3 method for data.frame
naive_fill_NA(data.table)
: S3 method for data.table
naive_fill_NA(matrix)
: S3 method for matrix
this is a very simple and fast solution but not recommended, for more complex solutions please check the vignette.