[R] Sorting a data frame with values of different lengths

William Armstrong William.Armstrong at noaa.gov
Tue Jun 7 17:50:09 CEST 2011


Thanks for catching that, Sarah.

It seems like the problem was that I was using the c() function to combine
terms (including W) that I was adding to a data frame.

This caused R to convert the numeric W to a character string.

I fixed this by using data.frame() and then rbind() instead of c() and
rbind(), which is now giving me the results I was expecting.

Thank you very much for your help.

Billy

--
View this message in context: http://r.789695.n4.nabble.com/Sorting-a-data-frame-with-values-of-different-lengths-tp3579653p3580000.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list