title: How to split comma-separated values in random order and create variables for each unique vlaue in R?
body: <p>I have a data frame that looks like this:</p>
  <pre><code>ID   Tags
  ------------
  1    a,b,c
  2    d,a,e
  3    e,a
  </code></pre>
  <p>I am trying to achieve something like this:</p>
  <pre><code>ID   Tag.a  Tag.b   Tag.c   Tag.d   Tag.e
  -----------------------------------------
  1     1       1       1       0       0
  2     1       0       0       1       1
  3     1       0       0       0       1   
  </code></pre>
  <p>I tried the separate function from tidyverse but I don't know how to deal with the random order of the tags...and I am relatively new to R, so I would really appreciate some kind help with this. Many thanks!</p>