Q: Error in sort.list(y): 'x' must be atomic for sort list I am trying to use c50 here what I did
train$default<-as.factor(train$default)

result<-C5.0(train[-17],train$default)

finalresult <- predict(result, test)

I am trying to run the following command table(test, Predicted=finalresult)in the R soft
 but it is giving the following error
Error in sort.list(y): 'x' must be atomic for sort list

any suggestions? 

A: You did not state how test looks. Since it is used for a prediction it presumably contains features and the value you want to predict. Assuming test$answer is what you want to predict. Try
    table(test$answer, Predicted=finalresult)

