Thank you all so much for your help.
I've gone with
repeated_measures_data.csv:
sub,A1B1,A1B2,A2B1,A2B2
s1,400,475,420,510
s2,390,500,470,472
s3,428,512,555,610
s4,703,787,801,822
s5,611,634,721,705
s6,543,522,612,788
s7,411,488,506,623
s8,654,644,711,795
library(reshape)
data<-read.csv("repeate
hadley wickham wrote:
On Fri, Jan 30, 2009 at 5:57 PM, Neil Stewart
wrote:
I have a data frame in wide format that I'd like to convert to long format.
For example, in wide format I have:
id A1B1A1B2A2B1A2B2
1 1 400 475 420 510
2 2 390
This will work:
> x <- read.table(textConnection(" id A1B1A1B2A2B1A2B2
+ 1 1 400 475 420 510
+ 2 2 390 500 470 472
+ 3 3 428 512 555 610
+ 4 4 703 787 801 822
+ 5 5 611
On Fri, Jan 30, 2009 at 5:57 PM, Neil Stewart
wrote:
> I have a data frame in wide format that I'd like to convert to long format.
> For example, in wide format I have:
>
>id A1B1A1B2A2B1A2B2
> 1 1 400 475 420 510
> 2 2 390 500 4
4 matches
Mail list logo