Displaying 1 result from an estimated 1 matches for "motiftable2".
2010 Jan 30
2
aggregate by factor
...aeijm -0.25000000
6 aehjm 0.08333333
To get the frequency table of events:
> motifTable <- as.data.frame(table(motifList$events))
> head(motifTable)
Var1 Freq
1 aeijm 110
2 begjm 46
3 afgjm 337
4 afhjm 102
5 aehjm 190
6 adijm 18
>
Now get the score column back in.
> motifTable2 <- merge(motifList, motifTable, by="events")
> head(motifTable2)
events percent freq
1 adgjm 0.00000000 111
2 adgjm NA 111
3 adgjm 0.13333333 111
4 adgjm 0.06666667 111
5 adgjm -0.16666667 111
6 adgjm NA 111
>
Then lastly to aggregate on t...