title: Reshape wide to long, preserving ID variable from rownames
body: <p>I am trying to get the following data into long format in R:</p>
  
  <pre><code>testdata &lt;- data.frame(rnorm(10),rnorm(10),rnorm(10))
  rownames(testdata) &lt;- paste0("ID",1:10) # Ids
  colnames(testdata) &lt;- c(2001,2002,2003) # Years
  testdata
  </code></pre>
  
  <p>So the columns = time, the rows = IDs. Should not be too hard, but in all the examples I found it was the other way around. How can this be done in <code>datatable</code> or <code>reshape</code> or in any other of the popular dataframe packages?
  Thanks for any hints. I know one way by transposing my data, but this seems to be a rather inefficient way for this purpose.</p>