title: Reshaping time series data from wide to tall format (for plotting)
body: <p>I have a data frame containing multiple time series of returns, stored in columns.</p>
  
  <p>The first column contains dates, and subsequent columns are independent time series each with a name. The column headers are the variable names.</p>
  
  <pre><code>## I have a data frame like this
  t &lt;- seq(as.Date('2009-01-01'),by='days',length=10)
  X &lt;- rnorm(10,0,1)
  Y &lt;- rnorm(10,0,2)
  Z &lt;- rnorm(10,0,4)
  
  dat &lt;- data.frame(t,X,Y,Z)
  
  ## which appears as
             t          X          Y         Z
  1 2009-01-01 -1.8763317 -0.1885183 -6.655663
  2 2009-01-02 -1.3566227 -2.1851226 -3.863576
  3 2009-01-03 -1.3447188  2.4180249 -1.543931
  </code></pre>
  
  <p>I want to plot each time series as a line on a separate plot, in a lattice, with each plot labeled by the variable names.  </p>
  
  <p>To plot this with lattice, the data must be in a tall format, as such:  </p>
  
  <pre><code>           t symbol       price
  1 2009-01-01      X -1.8763317
  2 2009-01-02      Y -0.1885183
  2 2009-01-02      Z -6.655663
  </code></pre>
  
  <p>What is a good function call to do this? </p>