How to calculate accuracy of a decision tree using rpart in R




I am having a dataset which has responses to various questions recorded.Some of the records have no response/missing values recorded as 0.For example a sample ques has the distribution.


  0   1   2   3   4 
 96 750 232  69  17 

0 is quite high here(96 out of 1164) records.So I was thinking of using decision trees to predict the value for records which have this value as 0.This is my code:

loantime.train <- vodka[which(vodka$Q13 != 0),]
loantime.test <- vodka[which(vodka$Q13 == 0),]
loantime.rpart <- rpart(Q13 ~ .,data = loantime.train,method = "class")

The output:

Can I say that the accuracy is 1-0.29775 or is there some other parameter which can be used for that.
How are such cases really dealt with ?
Can someone please help me with this??



no this is not the accuracy measure.
The xerror * the root node error gives the error (on the cross validation), in your case with pruning you have .29775 * 1.0377.