title: Transpose R data frame with text data
body: <p>I have been getting more familiar with R and learning about long and wide data frames. I am getting decent at using dcast (and ddply), but as far as I can tell, they rely on my data being numerical. In the following example, I have:</p>
  
  <pre><code>data.frame(color=c("red","orange","blue","white"),safe=c("N","N","Y","Y"))
  </code></pre>
  
  <p>Basically, the old assumption that insurance companies penalized "risky colors" of cars as being less safe. I'd like a command to turn this into a wide table. Is there a flavor or syntax of dcast I'm missing that would turn the above table into</p>
  
  <pre><code>red | orange | blue | white
   N  |   N    |  Y   |   Y
  </code></pre>
  
  <p>Thanks for any help.</p>