Re: [R] How to sort data sets?

2005-09-18 Thread Spencer Graves
?order Martin Lam wrote: Hi, I was wondering if someone know how to sort a data set by column. I've tried sort() but without luck. I would think there should be a function for it somewhere. An example with the iris data set would be appreciated. Thanks, Martin

Re: [R] How to sort data sets?

2005-09-18 Thread Kenneth Cabrera
If you want to sort a data frame according a variable, the use it like datfram[order(datfram$var),] to sort all the data.frame, not just a variable Spencer Graves wrote: ?order Martin Lam wrote: Hi, I was wondering if someone know how to sort a data set by column. I've tried sort()

[R] How to sort data sets?

2005-09-15 Thread Martin Lam
Hi, I was wondering if someone know how to sort a data set by column. I've tried sort() but without luck. I would think there should be a function for it somewhere. An example with the iris data set would be appreciated. Thanks, Martin __

Re: [R] How to sort data sets?

2005-09-15 Thread vincent
see : order, sort.list, sort and rank hih __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] How to sort data sets?

2005-09-15 Thread Uwe Ligges
Martin Lam wrote: Hi, I was wondering if someone know how to sort a data set by column. I've tried sort() but without luck. I would think there should be a function for it somewhere. An example with the iris data set would be appreciated. See ?order. Uwe Ligges Thanks, Martin