# NOT RUN {
data(spect)
Detect(spect)
missdata <- SimIm(spect, 0.1)
# }
# NOT RUN {
sum(is.na(missdata))
# impute using rpart
impdata <- impute(missdata, cFun = "rpartC")
# calculate the misclassification error
mr(impdata$imp, missdata, spect)
# }
Run the code above in your browser using DataLab