How to switch rows in R?
问题 I have a array with following content: > head(MEAN) 1901DJF 1901JJA 1901MAM 1901SON 1902DJF 1902JJA -0.45451556 -0.72922229 -0.17669396 -1.12095590 -0.86523850 -0.04031273 This should be a time series with seasonal mean values from 1901 to 2009. The problem is that the generated column heads are strictly alphabetically ordered. However, in terms of season this doesn't make to much sense, e.g. JJA (june, july, august) is leading MAM (march, april, may). How could I switch each MAM and JJA