[R] expand data
Oliver
fwang2 at gmail.com
Mon Jun 15 21:02:51 CEST 2009
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 this data set in a one row
per observation such that:
para.A para.B para.C observation.1
para.A para.B para.C observation.2
para.A para.B para.C observation.3
I am thinking of doing a loop on each row and expand it, but wondering
if there are other more convenient ways?
thanks
Oliver
More information about the R-help
mailing list