My question is very obvious: Is there any package to handle missing values in R?
I think this task can be done almost in an automatic way. I mean, we can have a function like the one below which is simply a quick pseudo function:
handle_missing_values(
dataframe,
threshold_remove_variable: 40% # remove the variable when the missing value amount is greater or equal than 40%
default_imputation_numeric_variables: "mean",
default_imputation_categoric_variables: "Not Specified",
imputation_numeric_variables: c(
field5: "knn",
field8: "prediction"
),
imputation_categoric_variables: c(
field2: "Not Asked"
),
remove_rows_with_missing_values_at_the_end: true
)
Thanks in advance!