Replaces NA values in a numeric matrix with the column median.
impute_na_median(mat)Numeric matrix with NA values replaced by column medians.
For each column, NA values are replaced with the median of non-NA values. If a column is entirely NA, it remains NA (a warning should be issued by the caller).