I want put the data base in long format.
It's my data:
But, i want put the years in rows and each code on columns keeping the id variable Countries
. I need work with this structure for data panel models.
I tried with dcast function but only give me the last value of the year (2019).