There are many files for which data is in the following form
year Jan Feb Mar ...........Dec
1990 x1 x2 x3 x12
1991 y1 y2 y3 y12
.
.
2000 z1 z2 z3 z12
I want to transpose each of the rows and stack them as a column to get the time series as
x1
x2
..
x12
y1
y2
..
y12
z1
.
.
z12
I have looked at the reshape package but not clear as to how it will apply in this problem.
Any ideas for doing this in R ?
Perhaps
melt()from the “reshape2” package is what you are looking for: