Re: [R] expand data

2009-06-15 Thread Henrique Dallazuanna
Try this: DF <- data.frame(para.A = c(1, 3), para.B = c(2, 4), para.C = c(3, 1), obs1 = c(4, 1), obs2 = c(5, 0), obs3 = c(7, 8)) long <- reshape(DF, direction = 'long', varying=4:6, sep = "") long[order(long$id),] On Mon, Jun 15, 2009 at 4:02 PM, Oliver wrote: > hi, all > > I

[R] expand data

2009-06-15 Thread Oliver
hi, all I inherited a data set with format like the following: para.A para.B para.C observation.1 observation.2 observation.3 Essentially, the same experiment (with same parameters) are conducted 3 times, with corresponding observations. What are the efficient ways of re-arranging t