I am trying to filter positions to C, R, L, and D. I want to calculate the avg number of goals based on Pos from this list. I am having a tough time filtering the positions and ultimately use averages or medians of data to associate a given position. I would also like to find the proportions of position amongst the top scorers in the league which could help with strategy as well.
A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need.