Impute missing data in a data frame
impute_data.RdThis function imputes missing data in a data frame (df) using the specified
imputation_method. Supported methods include "LOD", "1/5th", "KNN", "PPCA", "median", "mean", "RF", and "LCMD".
Usage
impute_data(
df,
df_meta_features = NULL,
imputation_method = "mean",
col_features = NULL,
col_LOD = NULL
)Arguments
- df
A data frame with missing values to be imputed.
- df_meta_features
A data frame containing feature metadata, required for "LOD" imputation.
- imputation_method
A character string specifying the imputation method. Valid options are: "LOD", "1/5th", "KNN", "PPCA", "median", "mean", "RF", "LCMD".
- col_features
(Optional) Character name of the column in
df_meta_featurescontaining feature names, required for "LOD" imputation.- col_LOD
(Optional) Character name of the column in
df_meta_featurescontaining the limit of detection (LOD) values, required for "LOD" imputation.