Question: what is xerror in rpart?
Answer: The "rel error" is 1−R2 Root mean squared error, similar to linear regression. This is the error on the observations used to estimate the model. The "xerror" is related to the PRESS statistic. This is the error on the observations from cross validation data.