I have a series of variable-specific data.frames like the following:
Variable 1:
LOCATION 2014.01 2014.02 2014.03 2014.04
902010 7 -3 14 5
Variable 2:
LOCATION 2014.01 2014.02 2014.03 2014.04
902010 9 11 6 3
I'd like to transform transform and combine them into the following format.
LOCATION DATE VARIABLE1 VARIABLE2
902010 2014.01 7 9
902010 2014.02 -3 11
902010 2014.03 14 6
902010 2014.04 5 3
I think the right approach is to transform one data.frame then add data from the others where date and location match.
The answers to similar-sounding questions recommend the library reshape2 or the function t(), but I'm having a hard time understanding how to use them for this scenario. I've also seen recommendations for the time-series library zoo.