Skip to content
Prev 363495 / 398502 Next

Replicate

I'm not sure why you'd want to, but here's one way to do it:

plotdat2[rep(1:nrow(plotdat), each=100), ]

This puts all the replicates of each row together.


plotdat2[rep(1:nrow(plotdat), times=100), ]

while this repeats each row then starts over.

If that answer doesn't make sense, then you should definitely go read
some of the great introductory material on R out there.

Sarah
On Tue, Aug 23, 2016 at 1:54 PM, Andr? Luis Neves <andrluis at ualberta.ca> wrote: