R/simlr_nhanes.R
impute_and_report_na.Rd
This function imputes missing values in a matrix with column means and reports the count of missing values per column.
impute_and_report_na(mat)
A numeric matrix.
A matrix with imputed values.
mat <- matrix(c(1, NA, 3, 4, 5, NA), ncol = 2) impute_and_report_na(mat) #> No missing values detected. #> [,1] [,2] #> [1,] 1 4 #> [2,] NA 5 #> [3,] 3 NA