I have the following data showing some numbers, broken down by year and month (the more recent happens to be first, but that's not a problem).
Is there (in R) a way to easily "reverse the pivot table" into a data frame with two columns, "data" and "value"? Of course, I could write a small program to do it (or, in this case, a few minutes of manual work would do it: remove the labels, put everything in one line, than in Excel paste the long line and fill in the timestamps with Fill Series), but I'm curious whether this can be done natively in R, since it will be useful in the future.
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2002 315 45 397 750 380 343 794 110 777 323 746 735
2003 748 711 315 395 726 359 799 138 719 345 787 772
2004 109 776 764 738 384 368 396 700 384 398 340 781
2005 747 720 191 938 188 135 185 177 753 733 313 399
2006 726 316 713 135 103 794 751 165 348 701 798 128
2007 763 123 276 111 150 145 163 226 248 950 917 879
2008 167 873 775 130 184 780 444 115 107 325 781 701
2009 897 143 805 104 743 158 113 727 755 764 394 710
2010 349 743 180 762 359 744 102 775 109 178 369 799
2011 746 706 800 737 786 194 195 105 101 784 795 142
2012 124 794 141 126 284 207 877 803 832 175 140 763
2013 796 100 896 119 810 134 100 183 792 185 743 792