So I have data of temperature and multiple years. However the same year pops up multiple times, ex 2001, 2001, 2001, 2001 etc. How do I compile these years into one single year and add the average temperature for that year? Using dplyr if possible.
I have tried using dplyr and writing some code like:
Data <- DataSet %>% group_by(XYZ) or mutate(XYZ).