> #Split > set.seed(1) > trainIndex <- sample(nrow(newdata), nrow(newdata) * .6) > train <- newdata[trainIndex, ] > test <- newdata[-trainIndex, ] > tree <- tree(Vote ~ ., data = test) > plot(tree) > text(tree, pretty = 2) > title(main = "Train Tree") > summary(tree) Classification tree: tree(formula = Vote ~ ., data = test) Variables actually used in tree construction: [1] "Age" "Family.Income" "Political.Party" "Bush.Approval" "Ideology" [6] "Race" "Region" Number of terminal nodes: 12 Residual mean deviance: 0.1024 = 39.74 / 388 Misclassification error rate: 0.0275 = 11 / 400