title: how to use cast on data frame with 3 columns
body: <p>In the following data.frame</p>
  
  <pre><code>Date1 &lt;- seq(from = as.POSIXct("2010-05-01 02:00"), 
               to = as.POSIXct("2010-05-01 06:00"), by = 3600)
  Dat &lt;- data.frame(DateTime = Date1,
                    Temp = rnorm(length(Date1)),
                    height = c(1,2,3,4,5))
  Dat2 &lt;- data.frame(DateTime = Date1,
                     Temp = rnorm(length(Date1)),
                     height = c(1,2,3,4,5))
  
  Dat3 &lt;- rbind(Dat,Dat2)
  </code></pre>
  
  <p>I would like to be able to use cast to re-structure the data.frame so that I end up with Time in the first column and then temp in the remaining column, where the values in height are used to define which column each of the values go into. I have seen cast in reshape being used a lot but if I try </p>
  
  <pre><code>require(reshape)
  cast(Dat3,Temp ~ height)
  </code></pre>
  
  <p>I receive an error</p>
  
  <pre><code>Using height as value column.  Use the value argument to cast to override this choice
  Error in `[.data.frame`(data, , variables, drop = FALSE) : 
    undefined columns selected
  </code></pre>
  
  <p>What can I do to solve this?</p>