I am an Excel user attempting to transition some of my routine data reporting tasks to R. One of the most powerful features in Excel is the ability to pivot and sort data. I know these functions are features in R as well but I am not sure how to write the code to solve this particular grouping and sorting problem.
Basically, using R I would like to take a data set that looks like this:
And transform it to look like this:
Notice that the final table groups points by team and then sorts the summary data by the number of points scored. Learning how to do this in R would be a huge time saver.
Thanks in advance for you help!