hi, i'm relatively new to r and rstudio but i'm having a difficult problem that i need help with. i have a set of data like in the picture. what i'm trying to do is to get the average number of different y that has same value of x as another specific y since the set is much longer and beside x that reoccurring, y also repeat itself. for example in the 1st row we have y = 1203, there are 4 'others y' with same x, later in the list 1203 will appear again and might have different x with different number of 'other y' with the same new x value, and i need to calculated the average of that number. so far i still havent figure out how to go about this please help