[R] How to extract rows from data frame based on unique variable groupings
Wu Gong
ghowoo at gmail.com
Fri May 21 00:26:04 CEST 2010
I hope this is what you want.
## Exclude replicated rows
(DF1 <- unique(DF))
## Sort the data
(DF2 <- DF1[order(DF1$V1, DF1$V2, DF1$V3, DF1$V4),])
-----
A R learner.
--
View this message in context: http://r.789695.n4.nabble.com/How-to-extract-rows-from-data-frame-based-on-unique-variable-groupings-tp2225233p2225410.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list