title: How cast on text?
body: <p>This is probably a very trivial question... I have a table similar to this:</p>
  
  <pre><code>tbl1 &lt;- data.frame(rbind(
  c("N1","G1","a"),
  c("N1","G1","b"),
  c("N1","G2","d"),
  c("N2","G1","e"),
  c("N2","G1","f"),
  c("N2","G2","g")
  ))
  </code></pre>
  
  <p>Which I want to convert it to this:</p>
  
  <pre><code>X1 | G1         | G2
  
  N1 | c("a","b") | "d"
  
  N2 | c("e","f") | "g"
  </code></pre>
  
  <p>I'm thinking this is the direction to go, but what should the "?" be set to?</p>
  
  <pre><code>tbl2 &lt;- data.frame(cast(tbl1,X1~X2, value="X3", ? ))
  </code></pre>
  
  <p>Thanks for all contributions to [r] at Stack Overflow!</p>
  
  <p>/Chris</p>