title: Making indicator variables out of lists in r
body: <p>I'm having a data reshaping problem that I could use some help.</p>
  
  <pre><code> ID          X1         X2         X3         X4         X5
  6001 Certificate  Associate Bachelor's   Master's   Doctoral
  5001 Certificate  Associate Bachelor's           
  3311 Certificate  Associate Bachelor's           
  1981 Certificate  Associate Bachelor's   Master's
  4001   Associate Bachelor's   Master's           
  2003   Associate Bachelor's   Master's   Doctoral
  2017 Certificate  Associate                      
  1001   Associate Bachelor's   Master's           
  5002  Bachelor's
  </code></pre>
  
  <p>I need to make these into dummy variables</p>
  
  <pre><code>  ID    Certificate     Associates      Bachelor         Master        Doctoral      
  6001              1              1             1              1               1
  5001              1              1             1              0               0 
  2017              1              1             0              0               0
  </code></pre>
  
  <p>Any suggestions? </p>