Re: [R] Collapsing across trials

2006-12-17 Thread Gabor Grothendieck
Try aggregate(DF[4], DF[1:3], mean) On 12/16/06, Pedro Alcocer [EMAIL PROTECTED] wrote: Hello, My ultimate goal is a repeated measures (mixed model) ANOVA, however, my present question is about how to reorganize my data into the format that the ANOVA commands expect. In particular, how to

Re: [R] Collapsing across trials

2006-12-16 Thread hadley wickham
On 12/16/06, Pedro Alcocer [EMAIL PROTECTED] wrote: Hello, My ultimate goal is a repeated measures (mixed model) ANOVA, however, my present question is about how to reorganize my data into the format that the ANOVA commands expect. In particular, how to collapse across trials. (I am using

Re: [R] Collapsing across trials

2006-12-16 Thread Pedro Alcocer
Thanks so much, Hadley. That's exactly what I needed. My only comment is that the line cast(Subj + List + Condition ~ variable , mean) should be cast(dfm, Subj + List + Condition ~ variable , mean) Your excellent demo on your site cleared that up quickly, however. Thanks again, Pedro On