[R] sort a list?
wwwhsd at gmail.com
Tue Oct 7 18:53:13 CEST 2008
x[order(unlist(x), decreasing = TRUE)]
On Tue, Oct 7, 2008 at 1:28 PM, <rkevinburton at charter.net> wrote:
> 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.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
25° 25' 40" S 49° 16' 22" O
More information about the R-help