Hi you have got some response about how to avoid an error but I am curious what you really want to achieve.
lll<-as.list(rnorm(15)) cbind(unlist(lll),order(unlist(lll))) [,1] [,2] [1,] 0.93344282 13 [2,] 0.63501664 14 [3,] 0.05976446 8 [4,] -0.49181944 9 [5,] 2.08002464 7 [6,] 0.53363526 4 [7,] -0.71654312 3 [8,] -1.29946583 11 [9,] -1.08968642 15 [10,] 1.00504020 6 [11,] 0.37454789 12 [12,] 0.63042834 2 [13,] -2.96375833 1 [14,] -1.33535021 10 [15,] 0.52719651 5 unlist(lll)[order(unlist(lll))] [1] -2.96375833 -1.33535021 -1.29946583 -1.08968642 -0.71654312 -0.49181944 [7] 0.05976446 0.37454789 0.52719651 0.53363526 0.63042834 0.63501664 [13] 0.93344282 1.00504020 2.08002464 Is this what you want? Regards Petr r-help-boun...@r-project.org napsal dne 15.12.2009 11:29:58: > > Hi All, > > Can you tell me why I get the error message below? It's driving me nuts. > > Thanks, > Tom > > > r_squared > [[1]] > [1] 0.9083936 > > [[2]] > [1] 0.8871647 > > [[3]] > [1] 0.8193883 > > [[4]] > [1] 0.728157 > > [[5]] > [1] 0.8849525 > > [[6]] > [1] 0.8459416 > > [[7]] > [1] 0.6702318 > > [[8]] > [1] 0.02997816 > > [[9]] > [1] 0.8974268 > > [[10]] > [1] 0.881217 > > [[11]] > [1] 0.8006688 > > [[12]] > [1] 0.7207697 > > [[13]] > [1] 0.8703734 > > [[14]] > [1] 0.8384346 > > [[15]] > [1] 0.6237472 > > > > > biggest=c(0,0) > > > > for (i in 1:15) { > + > + if (r_squared[i]>biggest[1]) biggest=c(r_squared[i],i)} > Error in r_squared[i] > biggest[1] : > comparison of these types is not implemented > > > > -- > View this message in context: http://n4.nabble.com/comparison-of-these-types- > is-not-implemented-tp964195p964195.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.