Try the reshape package
This should do what you want.
library(reshape)
df1 <- melt(mydata, id=c("ID"),
measured=c("a1","a2","a3")) ; df1
stats <- cast(df1, ID ~ variable , mean) ; stats
=
--- affy
Would ?aggregate help?
affy snp wrote:
>
>> Dear list,
>> I have a data frame like:
>>
>> > log2.ratios[1:3,1:4]
>>ID a1 a2 a3
>> 1 GS1-232B23 -0.0207500 0.17553833 0.21939333
>> 2 RP11-82D16 -0.1896667 0.02645167 -0.03112333
>> 3
> Dear list,
> I have a data frame like:
>
> > log2.ratios[1:3,1:4]
>ID a1 a2 a3
> 1 GS1-232B23 -0.0207500 0.17553833 0.21939333
> 2 RP11-82D16 -0.1896667 0.02645167 -0.03112333
> 3 RP11-62M23 -0.1761700 0.08214500 -0.04877000
> 4
3 matches
Mail list logo