Re: [R] rearrange data: one line per subject, one column per condition

2007-11-27 Thread jim holtman
You can use the reshape package: > > x <- read.table(textConnection("Group subjcondition variable + 1 1 1 746.36625 + 2 2 1 1076.152857 + 1 3 1 1076.152857 + 2 4 1 657.4263636 + 1 5 1 854.127

Re: [R] rearrange data: one line per subject, one column per condition

2007-11-27 Thread Henrique Dallazuanna
Hi, reshape(df, direction="wide", idvar="subj", timevar="condition")[,c(2,1,3,5)] On 27/11/2007, Dieter Vanderelst <[EMAIL PROTECTED]> wrote: > > Dear R-list, > > Is there a way to convert the typical long R data-format to a 1-line per > subject format? > > I have data formatted as: > > Group s

[R] rearrange data: one line per subject, one column per condition

2007-11-27 Thread Dieter Vanderelst
Dear R-list, Is there a way to convert the typical long R data-format to a 1-line per subject format? I have data formatted as: Group subjcondition variable 1 1 1 746.36625 2 2 1 1076.152857 1 3 1 1076.152857 2 4 1