Re: [R] reshaping issue

2011-05-17 Thread Dennis Murphy
Hi: Here's one way, using an abbreviated example: du <- data.frame(v1 = factor(rep(1:10, each = 4)), v2 = factor(rep(rep(1:2, each = 2), 10)), v3 = factor(rep(1:2, 20)), x1 = rnorm(40), y1 = rnorm(40), x2 = rnorm

Re: [R] reshaping issue

2011-05-17 Thread Scott Chamberlain
Can you provide a brief reproducible example for us to play with? Scott On Tuesday, May 17, 2011 at 12:31 PM, Stijn Van Daele wrote: > Dear R users, > > I have a problem with reshaping data. I know such questions have been asked > before, but I can't get it right, neither with the reshape funct

[R] reshaping issue

2011-05-17 Thread Stijn Van Daele
Dear R users, I have a problem with reshaping data. I know such questions have been asked before, but I can't get it right, neither with the reshape function nor with the melt function. My dataset has about 407 variables and about 48000 cases. Each case looks as follows: V1 v2 v3v4