knn imputation r code example Example: knn imputation in r require(imputation) x = matrix(rnorm(100),10,10) x[x>1] = NA kNNImpute(x, 3) x