title: R reorder table
body: <p>I have the following table:</p>
  
  <pre><code>NDVI_2009 NDVI_2010 NDVI_2011 NDVI_2012 NDVI_2013 SS_GROUP
  -0.0280374 0.1810340 -0.0206186 -0.0319149 0.00529101 6
  -0.0283019 0.1610170 -0.0452261 -0.0222222 0.00000000 3
  -0.0864198 0.1026620 -0.0978723 -0.0710901 -0.09090910 5
  -0.1192660 0.0762332 -0.1256280 -0.1340210 -0.12562800 5
  -0.1250000 0.0701754 -0.1330050 -0.1269040 -0.12315300 6
  -0.1181820 0.0810811 -0.1356780 -0.1370560 -0.13000000 6
  -0.0280374 0.1810340 -0.0206186 -0.0319149 0.00529101 4
  -0.0283019 0.1610170 -0.0452261 -0.0222222 0.00000000 4
  -0.0864198 0.1026620 -0.0978723 -0.0710901 -0.09090910 5
  -0.1192660 0.0762332 -0.1256280 -0.1340210 -0.12562800 2
  -0.1250000 0.0701754 -0.1330050 -0.1269040 -0.12315300 1
  -0.1181820 0.0810811 -0.1356780 -0.1370560 -0.13000000 1
  </code></pre>
  
  <p>Now I would like to  rearrange it to the following:</p>
  
  <pre><code>NDVI_GROUP SS_GROUP Value
  NDVI_2009 1 0.08192981
  NDVI_2009 1 -1.11667766
  NDVI_2009 1 0.34117450
  NDVI_2009 2 -0.42321236
  NDVI_2009 2 0.56033804
  NDVI_2009 2 0.32326817
  ...continuing
  </code></pre>
  
  <p>Means:</p>
  
  <p>First Column = Year</p>
  
  <p>Second Column = Group</p>
  
  <p>Third Column = Value</p>
  
  <p>In sequence ascending.</p>
  
  <p>So first all values of group 1 of 2009 among each other, then all values of group 2 of 2009, and so forth. Then the same for 2010 ... and so forth.</p>
  
  <p>I just don't find the right command to solve it with R.
  Is there anyone who might give me a hint???
  Would really appreciate it...</p>
  
  <p>Thanks,
  Hannes</p>