0

I would like to transform my data below using the R language:

Data Original

To the final format below:

Data Final

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?

  • 3
    This is a "reshape wide to long". There should be literally thousands of examples here at Stackoverflow such as https://stackoverflow.com/questions/2185252/reshaping-data-frame-from-wide-to-long-format – thelatemail Nov 04 '21 at 23:37
  • thank you very much, i managed to apply the idea of ​​the exemple and apply it to my data! It worked out! – Vitor Oliveira Nov 05 '21 at 00:34

0 Answers0