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
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
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
3 matches
Mail list logo