Very sorry if this is a reposted question, I checked the search engine and couldn't find the answer I was looking for. Say I have the following dataset:
Plot Plant Count
1 101 1 9
2 101 2 15
3 101 3 5
4 101 4 15
5 101 5 26
6 102 1 9
7 102 2 26
8 102 3 9
9 102 4 15
10 102 5 17
11 103 1 12
12 103 2 6
13 103 3 22
14 103 4 12
15 103 5 6
I'd like to average the "Count" number between the 5 plants of each plot. However, in my real dataset, I have much more than 3 plots. Is there a way to write my code so that it automatically averages all my plots at once? I'd like to learn to write a code that would get me the average for each plot as efficiently as possible. Any help would be very much appreciated.
I am fairly new to stackoverflow and am not the strongest with R, so if I have made a mistake in my formatting or something similar please let me know. Thanks for your time!