title: CAST ERROR IN R Error in `[.data.frame`(data, , variables, drop = FALSE) : undefined columns selected
body: <p>I am getting this error in R when casting data using package "Reshape": </p>
  
  <pre><code>"Error in `[.data.frame`(data, , variables, drop = FALSE) : 
    undefined columns selected"
  </code></pre>
  
  <p>Waterquality Data look like this:    </p>
  
  <pre><code>   year turbid.ave.mo month2
  16 2002     926.66667   JUNE
  23 2002     493.66667   JULY
  29 2002     107.10000    AUG
  37 2002     295.80000   SEPT
  46 2002     528.28000    OCT
  53 2002     266.20000    NOV
  56 2002      73.80000    DEC
  1  2003     115.00000    JAN
  </code></pre>
  
  <p>I want to cast so that month is column header (one row per year with JAN to DEC as column headers.  </p>
  
  <p>Code I tried: </p>
  
  <pre><code>casted = cast(Waterquality [ ,c(1:3)], year + turbid.ave.mo ~ month2, mean, fill =0, value = "turbid.ave.mo")
  </code></pre>
  
  <p>Error: Error in <code>[.data.frame</code>(data, , variables, drop = FALSE) : 
    undefined columns selected</p>
  
  <p>Anybody tell me what I am doing wrong?  Thanks in advance!!</p>