Skip to content
Prev 180179 / 398503 Next

Help with reshape/reShape and indexing

Try this:

DF$Index <- ave(1:nrow(DF), DF$Name, FUN = seq_along)
reshape(DF[-3], dir = "wide", idvar = "Name", timevar = "Index")

Also see the reshape package for another similar facility.
On Wed, May 13, 2009 at 2:02 AM, Dana Sevak <dana.sevak at yahoo.com> wrote: