I am doing one classification problem in R but after the predication model I want to get the table between predicted one and tested one but I am getting the error

“Error in sort.list(y) : ‘x’ must be atomic for 'sort.list’

Have you called ‘sort’ on a list?

library(C50)

train<-read.csv(“data.csv”)

test<-read.csv(“result.csv”)

m1 <- C5.0(train[,-15],test[,15])#model

p1 <- predict(m1,test)#predicator

summary(p1)

table(test,p1)

# “Error in sort.list(y) : 'x' must be atomic for 'sort.list'

**hinduja1234**#1

Can you show what is the head of the matrix p1? And where do you get this error?

**hinduja1234**#3

library(C50)

train<-read.csv(“data.csv”)

test<-read.csv(“result.csv”)

m1 <- C5.0(train[,-15],test[,15])#model

p1 <- predict(m1,test)#predicator

summary(p1)

table(test,p1)

I am getting this error after table command

**punitha**#5

I am facing exactly the same issue: I am building a logistic model in R and have also converted my variables to PCA.

It throws the same error when I run my table syntax for my predicted train model.

Did you find a solution to your problem? If so can u please tell me how you went about with it?

**tanushree76**#6

Any body got the solution?

I am facing exactly the same issue. Please let me know.

confusion Matrix(pred, test)