[R] Finding the Mean of a Specific Set of Columns

Isaac Barnhart |hb @end|ng |rom k@u@edu
Thu Feb 14 15:31:38 CET 2019


I am having trouble finding the mean of a specific part of my dataset. Here is a sample of it:

plot lai leaf
1 104 82 1
2 104 167 2
3 104 248 3
4 104 343 4
5 104 377 5
6 105 64 1
7 105 139 2
8 105 211 3
9 105 296 4
10 105 348 5
11 106 94 1
12 106 167 2
13 106 243 3
14 106 281 4
15 106 332 5
16 108 83 1
17 108 382 2
18 108 320 3
19 108 146 4
20 108 129 5

I have many different plot numbers, none of which follow any kind of specific numeric sequence (even though I have sorted them from smallest to largest). I need to take the average (mean) of the LAI for each plot, and was wondering if there was a way to specify the code to do this. For example: I need the average of all the LAI measurements for each leaf of plot 104, 105, etc. Any help would be appreciated. Thanks!

Get Outlook for iOS<https://aka.ms/o0ukef>

	[[alternative HTML version deleted]]



More information about the R-help mailing list