I have run a classification tree in R using rpart. The tree was pruned and then plotted with rpart.plot. When I extract which terminal node (leaf) each observation was allocated to in the pruned tree, I find that the proportion of all the data observations in each node differs from the proportions displayed in the terminal leaves of the pruned tree plot. They differ from about 1% to 5%. For example for one terminal node, rpart.plot displays that 46% of all the observations are in this leaf, whereas when I extract the terminal node allocations from the pruned tree object, a table shows that 51% of all observations were allocated to this terminal node.
The outcome is a four level categorical variable and the tree was done with weights for each observation. The pruned tree has 8 terminal nodes.
Why is there this discrepancy?