I'm filling NA with missForest()
package in R. In my subset where there is no POSIXct date format, it's working well but when I try in my sample where I have POSIXct format, an error occurred Error in sample.int(length(x), size, replace, prob) : invalid first argument
... but both samples are quite similar, just a POSIXct with NA inside for the second.
I make a test just adding a column to the first subsample with today's date and adding 3 NA in it. The package is not working.
Do you have any idea to fix it, or any other package may exist taking into account date format ?
You could take an example as following to see what I mean:
df <- data.frame(
Date = Sys.Date(),
LOT = rnorm(5),
S12_A = c(7,7,7,7,7),
S123_AA = c(1,1,NA,1,1),
S135_AA = rnorm(5),
S1763_BB = rnorm(5),
S173_BB = rnorm(5)
)
df$Date[4] <- NA
library(missForest)
missForest(df)