You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my session info is attached below. I already dug through the code for a bit and it seems that the old data used by the nnimp function (stored in pp$data) does not contain the factor columns and the function then tries to select all non-NA columns of the new data from the old data (old[, non_missing_cols, drop = FALSE]), which fails because the factors are not NA but not in the old data.
Is this a bug, or am I missing something when it comes to using the "knnImpute" option?
R version 3.2.4 (2016-03-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Gentoo/Linux
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF8
[4] LC_COLLATE=en_US.UTF8 LC_MONETARY=en_US.UTF8 LC_MESSAGES=en_US.UTF8
[7] LC_PAPER=en_US.UTF8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets compiler methods base
other attached packages:
[1] caret_6.0-64 ggplot2_2.0.0 lattice_0.20-33 mlbench_2.1-1
The text was updated successfully, but these errors were encountered:
Hello,
here is a reproducible example:
This does not produce errors when using "medianImpute". When I remove the only factor from the data, it works as expected:
my session info is attached below. I already dug through the code for a bit and it seems that the
old
data used by thennimp
function (stored in pp$data) does not contain the factor columns and the function then tries to select all non-NA columns of the new data from the old data (old[, non_missing_cols, drop = FALSE]
), which fails because the factors are not NA but not in the old data.Is this a bug, or am I missing something when it comes to using the "knnImpute" option?
The text was updated successfully, but these errors were encountered: