This is weird. I get this error
Error in sort.list(y) : \'x\' must be atomic for \'sort.list\' Have you called \'sort\' on a list?
I solved it by unlisting cc2 unli <- unlist(cc2) then converted it to df df<-as.data.frame(cc2)
unli <- unlist(cc2)
df<-as.data.frame(cc2)