title: Restructure using tidyr
body: <p>I have data that comes to me within 1 long string (per row). Basically it’s semicolon delimited and the columns / answers are separated by an <code>=</code>. I'm trying to do the following:</p>
  
  <p>Current structure: </p>
  
  <pre><code> Row1: “Column1 = blah1;Column2 = blah2;Column3 = blah3;Column4 = blah4” 
   Row2: “Column1 = blah1;Column2 = blah2;Column3 = blah3;Column4 = blah4”
  </code></pre>
  
  <p>Convert to -></p>
  
  <pre><code>Column1|Column2|Column3|Column4
  blah1|blah2|blah3|blah4
  blah1|blah2|blah3|blah4
  </code></pre>
  
  <p>I believe the <code>tidyr</code> package within R is the way to go, but I haven't been able to figure it out.</p>
  
  <p>This is as far as I've gotten using <code>tidyr</code>, but I am still getting errors:</p>
  
  <pre><code># CREATE TEST DATA
  mydata &lt;- as.data.frame(c("Column1 = blah1; Column2 =  blah2; Column3 = blah3; Column4 = blah4","Column1 = blah1; Column2 =  blah2; Column3 = blah3; Column4 = blah4","Column1 = blah1; Column2 =  blah2; Column3 = blah3; Column4 = blah4"))
  names(mydata) &lt;- "TEST"
  
  # Create dummy vector
  x &lt;- vector(mode="numeric", length=0)
  
  # Separate by ;
  x &lt;- separate(mydata, TEST, x, sep = ";" )
  </code></pre>
  
  <p>Any help is much appreciated.</p>