My data looks like this:
BLOCK1 0 1 Locus_540_Transcript_32_Length_8324_genewise_newlength_8215__CDS__3870__6491 513 C A 0/1:23,12:35:99:262,0,691 19,10:-40.6,-28.8,-78.7:-11.9:6.0
2 3
BLOCK1 0 1 Locus_540_Transcript_32_Length_8324_genewise_newlength_8215__CDS__3870__6491 1095 G A 0/1:35,12:47:99:328,0,1157 30,11:-61.1,-63.4,-134.7:2.2:12.0
3 4
BLOCK1 0 1 Locus_540_Transcript_32_Length_8324_genewise_newlength_8215__CDS__3870__6491 1217 G A 0/1:22,12:34:99:314,0,730 20,10:-68.4,-54.2,-109.0:-14.2:6.0
4 5
BLOCK1 0 1 Locus_540_Transcript_32_Length_8324_genewise_newlength_8215__CDS__3870__6491 1219 A C 0/1:22,12:34:99:308,0,715 20,10:-69.9,-54.2,-107.7:-15.7:6.0
5 6
BLOCK1 0 1 Locus_540_Transcript_32_Length_8324_genewise_newlength_8215__CDS__3870__6491 1721 G C 0/1:15,6:21:99:141,0,464 7,5:-21.8,-18.5,-30.1:-3.3:4.0
6 8
BLOCK2 0 1 Locus_540_Transcript_32_Length_8324_genewise_newlength_8215__CDS__3870__6491 2171 G C 0/1:14,13:27:99:388,0,369 9,5:-35.3,-26.5,-46.7:-8.7:3.0
7 10
BLOCK3 1 0 Locus_540_Transcript_32_Length_8324_genewise_newlength_8215__CDS__3870__6491 3661 G A 0/1:148,55:203:99:1070,0,4008 107,39:-163.0,-160.9,-438.4:-2.1:33.0
8 11
BLOCK3 1 0 Locus_540_Transcript_32_Length_8324_genewise_newlength_8215__CDS__3870__6491 3700 C T 0/1:124,124:249:99:3271,0,3667 117,107:-510.2,-163.3,-565.9:-346.9:4.0
9 12
BLOCK3 1 0 Locus_540_Transcript_32_Length_8324_genewise_newlength_8215__CDS__3870__6491 3754 T C 0/1:140,107:248:99:2786,0,3946 133,101:-436.9,-85.9,-558.8:-351.0:2.0
10
all I want is an R command that will allow me to calculate various properties of, say, columns 2 and 3 (which are columns of 0's and 1's) and do this FOR EACH block (column1). So, for example, BLOCK1 below has 4 lines in it, BLOCK2 has one line, etc. A basic question I want to know is: for each block, how many zeros are there in column 2, and how many in column 3?
Can anyone help? I tried using various forms of aggregate(), but the problem is that the FUN argument doesn't allow me to do the above. Or maybe it does, but I can't figure it out...