I have a frequency table of length classes of fish per location:
LK Loc1 Loc2 Loc3
1 13 22 0
2 20 18 4
3 12 21 2
4 2 0 1
5 1 2 0
I would like to calculate the mean and median value for each column (location) separately. For instance: Loc1: mean = (13 x 1)+(20 x 2)+(3 x 12)+(2 x 4)+(5 x 1)= 2.1 LK for Location 1.
I got really stuck on this and I don't know where to start. Is there a way to calculate this automatically for each column? Thank you in advance.