I have the following data of Unemployement per Year and quarter, but in my data frame is up to 2018, but I will use only 2 years for exemple.
Year       Unemployement
1997Q3       1914 
1997Q4       1697 
1998Q1       1702 
1998Q2       1645 
1998Q3       1742 
1998Q4       1605
What code can I use in order to tidy the Year column and to have the following data, and mainly to obtain the unemployment number by calculating the mean of each data per year: 1997 and 1998 (+ for other years that I have in my data frame). In the final version, I would like to have only one data of Unemployment per year, which theoretically shoud be the average of all Quaters
Year       Unemployement
1997         1805.50
1998         1673.50 
Thank you!
 
    