I have 19 rows worth of data with columns A and B which looks like this:
If, for example, I wanted to combine rows A=0,1 and rows A=2,3,4, with column B taking the mean of the joint rows, how would I code this? I've tried using aggregate(), but am not sure how to combine the specific rows when they don't share a common value.
In the end, I want something like:
Thanks in advance!