[R] Help using order with data.frame
arun
smartpink111 at yahoo.com
Sun Mar 16 05:29:31 CET 2014
Try:
t[order(t$z),]
#or
t[with(t,order(z)),]
A.K.
On Sunday, March 16, 2014 12:27 AM, Jason Rupert <jasonkrupert at yahoo.com> wrote:
Evidently, I'm overlooking something simple. I'm trying to used order with data.frame.
For example:
t = data.frame(x = c(11,12,14), y = c(19,20,21), z = c(10,9,7))
t[order(z), ]
Error in order(z) : object 'z' not found
Thank you for any insights and advice provided.
[[alternative HTML version deleted]]
______________________________________________
R-help at 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.
More information about the R-help
mailing list