I have a data frame that looks like this:
| | 2005 | 2005 | 2005 | 2005 | 2006 | ...
| | Q1 | Q2 | Q3 | Q4 | Q1 |
| Goods | 85.829 | 86.371 | 87.304 | 87.999 | 88.456 |
| Durable Goods | 90.065 | 90.393 | 91.893 | 91.986 | 91.909 |
| Motor Vehicles | 94.145 | 94.514 | 93.809 | 94.408 | 94.630 |
...
And I need it to look like this:
**| Item | Year | Quarter | Value |**
| Goods | 2005 | Q1 | 85.829 |
| Goods | 2005 | Q2 | 86.371 |
| Goods | 2005 | Q3 | 87.304 |
...
| Durable Goods | 2005 | Q1 | 90.065 |
| Durable Goods | 2005 | Q2 | 90.393 |
| Durable Goods | 2005 | Q3 | 91.893 |
...
The year range is from 2005 to 2017, 4 quarters for every year.
I have tried using melt() and reshape() as well as transposing the data and working with it from that format, but I keep getting messy results.
For reference, I am working in R studio. I prefer to use tidyverse for my data, but I am willing to use any packages necessary for a solution.