[R] sort a list?

rkevinburton at charter.net rkevinburton at charter.net
Tue Oct 7 18:28:44 CEST 2008

I am trying to sort a list and the data is obiously not in the right format. I am trying:

x <- list()
x[["A"]] <- 1
x[["B"]] <- 2


But am getting:

Error in order(x) : unimplemented type 'list' in 'orderVector1'

How should I change the list so that it can be sorted? What kinds of objects (classes of objects) can be sorted?

Thank you.


More information about the R-help mailing list