title: Convert tab delimited string to dataframe
body: <p>I have a long character string that looks like this, except where I've shown double back slashes there is, in reality, only one backslash.</p>
  
  <pre><code>char.string &lt;- "BAT\\tUSA\\t\\tmedium\\t0.8872\\t9\\tOff production\\tCal1|Cal2\\r\\nGNAT\\tCAN\\t\\small\\t0.3824\\t11\\tOff production\\tCal3|Cal8|Cal9\\r\\n"
  </code></pre>
  
  <p>I tried the following. </p>
  
  <pre><code>df &lt;- data.frame(do.call(rbind, strsplit(char.string, "\t", fixed=TRUE)))
  
  df &lt;- ldply (df, data.frame)
  </code></pre>
  
  <p>The first returns a vector. The second returns thousands of rows and two columns, one consisting of sequential numbers and the second consisting of all the data.</p>
  
  <p>I'm trying to achieve this:</p>
  
  <pre><code>item = c("BAT", "GNAT")
  origin = c("USA", "CAN")
  size = c("medium", "small")
  lot = c("0.8872", "0.3824")
  mfgr = c("9", "11")
  stat = c("Off production", "Off production")
  line = c("Cal1|Cal2", "Cal3|Cal8|Cal9")
  
  df = data.frame(item, origin, size, lot, mfgr, stat, line)
  df
  
    item origin   size    lot mfgr           stat           line
  1  BAT    USA medium 0.8872    9 Off production      Cal1|Cal2
  2 GNAT    CAN  small 0.3824   11 Off production Cal3|Cal8|Cal9
  </code></pre>