This may be a simple question but I stuck in this problem. I am using Recursive Partitioning (rpart) package in R for building a classification tree. I generated a tree from a sample data (for testing rpart). I fit the sample data using rpart's formula
fit = rpart(formula, data=, method=,control=)
This gave me the classification tree. I can see the summary, plot the tree, plot the result. But my question is how can I use its result for prediction? I want to supply a input data to the tree and I want the algorithm to give the correct classification for the input. But I think I have nothing to do with the tree unless I can predict. I may be interpreting the result in a wrong way. Please make me clear about this.