Displaying 1 result from an estimated 1 matches for "cat2cog".
2010 Oct 23
1
Summarizing For Values with Multiple categories
Hi all,
I have some data as follows.
Cat1 Cat2 Cat3 COG Counts
A B C COG1 10
B D COG2 20
C COG3 30
D COG4 40
I would like to sum all the counts for each category:
A B C D
10 30 40 60
>CAT2COG<-
list(A="COG1",B=c("COG1","COG2"),C=c("COG1","COG3"),D=c("COG2","COG4"))
> COG2CAT<-
list(COG1=c("A","B","C"),COG2=c("B","D"),COG3=c("C"),COG4="D"...