I have a large data.frame
(over 44,000 rows) which I have managed to aggregate
into 128 rows that include my analysis Section
and the sum of cells within that section presented as Count
, an example of which looks like the following:
Section Count
A - 2-1 10
A - 2-2 2
A - 2-3 39
A - 2-4 31
A - 2-5 42
A - 2-6 1
A - 2-7 9
A - 2-8 4
A - 2-9 2
A - 3-1 52
A - 3-2 27
A - 3-3 42
A - 3-4 107
A - 3-5 6
A - 3-6 51
A - 3-7 155
A - 3-8 5
A - 3-9 13
I have looked at related topics but they all deal with having the same ID tag that makes it easy to group. What I want to do is to further aggregate so I can combine all of my Sections
(e.g A-2) that have multiple fields (A-2-1, A-2-2, etc...) to give me a total cell Count
, so that it appears as follows:
Section Count
A - 2 140
A - 3 458
I've been trying various ways of doing this based on other threads but cannot get any to work, so any help would be greatly appreciated!