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
I've been a big fan/user of this package for a while, so I thought I would contribute a bug report on an issue I just encountered. Essentially, if one of the columns in a data frame is not a vector, the code will error without explanation because the column names don't transfer into a matrix of missing values (dataNA). It appears to happen at this line of code:
dataNA <- is.na(data[, visitSeq, drop = FALSE])
Some reproducible code is below:
# reproducible example
library(missRanger)
irisWithNA <- generateNA(iris, seed = 34)
# scale some variables
irisWithNA$Sepal.Length <- scale(irisWithNA$Sepal.Length)
class(irisWithNA$Sepal.Length)
try(missRanger(irisWithNA, pmm.k = 3, num.trees = 100))
# convert back to vector
irisWithNA$Sepal.Length <- c(scale(irisWithNA$Sepal.Length))
missRanger(irisWithNA, pmm.k = 3, num.trees = 100)
It's not really a bug per se, just either some missing pre-processing or a need for an informative error message. I feel like it would be worthwhile to address given how common the scale function is in R.
The text was updated successfully, but these errors were encountered:
Hi -
I've been a big fan/user of this package for a while, so I thought I would contribute a bug report on an issue I just encountered. Essentially, if one of the columns in a data frame is not a vector, the code will error without explanation because the column names don't transfer into a matrix of missing values (
dataNA
). It appears to happen at this line of code:Some reproducible code is below:
It's not really a bug per se, just either some missing pre-processing or a need for an informative error message. I feel like it would be worthwhile to address given how common the
scale
function is in R.The text was updated successfully, but these errors were encountered: