Displaying 1 result from an estimated 1 matches for "t2_cond1".
Did you mean:
t1_cond1
2011 May 22
2
Convert dataframe with two factors from wide to long format
I know how to convert a simple dataframe from wide to long format with one
varying factor. However, for a dataset with two factors like the following,
Subj T1_Cond1 T1_Cond2 T2_Cond1 T2_Cond2
1 0.125869 4.108232 1.099392 5.556614
2 1.427940 2.170026 0.120748 1.176353
How to elegantly convert to a long form as
Subj Time Cond Value
1 1 1 0.125869
1 1 2 4.108232
1 2 1 1.099392
...
Thanks in advan...