I have a very simple array on which I want to run ROC curve analysis. But first, when i try to force data into Factor type using command table[1]<-factor(table[1])
, i get the error
Error in sort.list(y) : 'x' must be atomic for 'sort.list'
Have you called 'sort' on a list?
Few sample rows from the data are give below
GRADE TRUE-GRADE
benign Benign
benign Benign
benign Benign
benign Benign
benign Benign
benign Benign
benign Malignant
benign Malignant
indeterminate Benign
indeterminate Benign
indeterminate Benign
indeterminate Benign
indeterminate Benign
indeterminate Benign
indeterminate Benign
indeterminate Benign
indeterminate Benign
indeterminate Benign
indeterminate Benign
indeterminate Benign
indeterminate Benign
indeterminate Malignant
indeterminate Malignant
indeterminate Malignant
likely benign Benign
likely benign Benign
likely benign Benign
Can someone tell me what I am doing wrong ? result of str(table) is given below:
data.frame': 127 obs. of 2 variables:
$ GRADE : Factor w/ 5 levels "benign","indeterminate",..: 1 1 1 1 1 1 1 1 1
$ BENIGN.MALIGN: Factor w/ 2 levels "Benign","Malignant": 1 1 1 1 1 1 1 1 1 1 ...