Re: [R] Problem with reshaping data from wide to long format

2010-03-25 Thread Lauri Nikkinen
Thanks, that solved my problem! -Lauri 2010/3/25 Gabor Grothendieck : > Try new.row.names = 1:150 as an arg to reshape. > > On Thu, Mar 25, 2010 at 2:04 PM, Lauri Nikkinen wrote: >> Hi, >> >> I have a data.frame in wide format which I would like to reshape into >> a long format: >> >> example (n

Re: [R] Problem with reshaping data from wide to long format

2010-03-25 Thread Gabor Grothendieck
Try new.row.names = 1:150 as an arg to reshape. On Thu, Mar 25, 2010 at 2:04 PM, Lauri Nikkinen wrote: > Hi, > > I have a data.frame in wide format which I would like to reshape into > a long format: > > example (nonsense) data: > >> dput(perus2) > structure(list(id = c(30L, 38L, 21L, 12L, 22L, 2

[R] Problem with reshaping data from wide to long format

2010-03-25 Thread Lauri Nikkinen
Hi, I have a data.frame in wide format which I would like to reshape into a long format: example (nonsense) data: > dput(perus2) structure(list(id = c(30L, 38L, 21L, 12L, 22L, 28L, 31L, 44L, 8L, 47L, 23L, 20L, 41L, 42L, 29L, 50L, 5L, 33L, 4L, 17L, 11L, 1L, 18L, 6L, 9L, 32L, 16L, 14L, 39L, 48L, 3