I have a dataset which contains data on the abundance of an organism and the sediment mud content % in which it was found.
I have subsequently partitioned the mud content data into 10 bins (i.e. 0 - 10%, 10.1 - 20% etc) and placed the abundance data into each bin accordingly.
The primary aim is to plot the maximum abundance in each mud bin over the mud gradient (i.e. 0 - 100 %) but for these maximums to be weighted by the number of samples in each bin.
So, my question is how to weight the maximum abundance in a given mud bin by the number of samples in each bin?
Here is an simple subset of my data:
Mud % bins: | 0 - 9 | 9.1 - 18 | 18.1 - 27 |
Abundance: 10,10,2,2,2,1,1 15,15,15,2 20,20,20,1,1,1,1,1