I'm pretty sure my question doesn't totally make sense, but I'm trying to create a classification tree in R using 'rpart' and initially had the fit as something like:
fit <- rpart(success ~ A + B + C)
I have now realised 'success' might also be measured by another 'value'. So I was going to amend it to:
fit <- rpart(success + new_option ~ A + B + C)
But when I run these lines:
plot(fit, uniform=TRUE, main="Success plot")
text(fit, use.n = TRUE, all=TRUE, cex=.8)
post(fit, file = "tree.ps", title="Success plot")
I get this error:
Error in plot.rpart(fit, uniform = TRUE, main = "Success plot") :
fit is not a tree, just a root
So just wondering - is this even possible? Or do I need to tackle this in a totally different way?