Apologies if this has been asked before, but other simliar questions I couldnt get to work with my data frame. And if it's not obvious Im quite new at coding in genreal.
A simplified version of my data.frame
| Sex | Age | X |
-----------------
| F | One | 1 |
| F | One | 2 |
| F | Two | 1 |
| F | Two | 2 |
| M | One | 1 |
| M | One | 2 |
| M | Two | 1 |
| M | Two | 2 |
And Im trying to produce a seperate mean of the X column for the F one, F two, M one and M two, such as the table below.
| Sex | Age | X |
-----------------
| F | One | mean |
| F | Two | mean |
| M | One | mean |
| M | Two | mean |
Any help or direction on where to look would be very helpful. Thanks.