#From the survived variable decide on Sex variable library(rpart) library(rattle) library(rpart.plot) library(RColorBrewer) fit <- rpart(Survived ~ Sex, data=train, method="class") fancyRpartPlot(fit)