Dear R Experts
I got the following error messages during the KNN imputation:
#KNN imputation library(VIM) ?knn() KNNImputed <- kNN (data1, variable = c("var_1"), k = 20) > In `[<-.data.table`(`*tmp*`, indexNA2s[, variable[j]], variable[j], : > Coerced 'double' RHS to 'integer' to match the column's type; may have truncated precision. Either change the target column ['var_1'] to 'double' first (by creating a new 'double' vector length 787 (nrows of entire table) and assign that; i.e. 'replace' column), or coerce RHS to 'integer' (e.g. 1L, NA_[real|integer]_, as.*, etc) to make your intent clear and for speed. Or, set the column type correctly up front when you create the table and stick to it, please.
Thanks for considering my request.