Impute Missing Values with Half the Minimum
impute_with_half_min.RdThis function imputes missing values in numeric columns by replacing each NA
with half the minimum non-missing value of that column. You can restrict imputation
to a subset of columns using the cols argument.
Examples
if (FALSE) { # \dontrun{
impute_with_half_min(df) # Impute all numeric columns
impute_with_half_min(df, cols = c("a", "b")) # Impute only columns a and b
} # }