I would like to transform my data below using the R language:
To the final format below:
My data goes to the year 2017, the images are just a snippet of the data. The main goal is to structure the data to create a time series. Another approach, would it be possible to create a time series with the original data? I did several searches but I didn't find something specific for my case. I tried using the "melt" function but I was not successful. Can anybody help me?