Skip to content
Prev 309489 / 398506 Next

Mean Help

please provide a bit of the dataframe in the future using the dput() function
height color
1       1  blue
2       2 green
3       3  blue
4       4 brown
5       5  blue
6       6 brown
7       7 green
8       8 brown
9       9 green
10     10 brown
height color
1      1  blue
3      3  blue
5      5  blue

should create a new dataframe with only those that have blue eyes, then
[1] 3

should provide you with the mean of those.
On 31.10.2012, at 14:18, Hard Core wrote: