# NOT RUN {
data(ptitanic)
summary(ptitanic)
# main indicator of missing data is 3rd class esp. with many children
obs.with.nas <- rowSums(is.na(ptitanic)) > 0
prp(rpart(obs.with.nas~., data=ptitanic, method="class"),
main="observations with missing data", extra=7)
# }
Run the code above in your browser using DataCamp Workspace