Single column missing value imputation error

Simultaneous imputation of multiple columns works fine but imputing a single column causes an exception.

Exception: ERROR: Error in [.data.frame(data.x, , i): undefined columns selected
Error in [.data.frame(data.x, , i): undefined columns selected
Traceback:

  1. kNN(data, variable = impute, k = neighbours)2. dist_single(as.data.frame(don_dist_var), as.data.frame(imp_dist_var),
    . numericalX, factorsX, ordersX, mixedX, levOrdersX, don_index,
    . imp_index, weightsx, k, mixed.constant, provideMins = weightDist)3. gowerD(don_dist_var, imp_dist_var, weights = weightsx, numericalX,
    . factorsX, ordersX, mixedX, levOrdersX, mixed.constant = mixed.constant,
    . returnIndex = TRUE, nMin = as.integer(k))4. as.numericX(data.x[, i])5. “character” %in% class(x)6. data.x[, i]7. [.data.frame(data.x, , i)8. stop(“undefined columns selected”)
1 Like

Nice find. Thanks for the report, Denis!

I have registered this issue in our bug tracking system.