Skip to content
Prev 79254 / 398502 Next

Repeating lines in a data frame

See ?order, e.g.,
(a <- expand.grid(1998:2000,1:2,1:3))
attach(a)
(b <- a[order(Var1,Var3,Var2),])

Hank
On Oct 18, 2005, at 3:20 PM, Guenther, Cameron wrote:

            
Dr. Martin Henry H. Stevens, Assistant Professor
338 Pearson Hall
Botany Department
Miami University
Oxford, OH 45056

Office: (513) 529-4206
Lab: (513) 529-4262
FAX: (513) 529-4243
http://www.cas.muohio.edu/~stevenmh/
http://www.muohio.edu/ecology/
http://www.muohio.edu/botany/
"E Pluribus Unum"