title: Reading text into data.frame where string values contain spaces
body: <p>What's the easiest way to read text from a printed data.frame into a data.frame when there are string values containing spaces that interfere with <code>read.table</code>?  For instance, this data.frame excerpt does not pose a problem:</p>
  
  <pre><code>     candname party elecVotes
  1 BarackObama     D       365
  2  JohnMcCain     R       173
  </code></pre>
  
  <p>I can paste it into a <code>read.table</code> call without a problem:</p>
  
  <pre><code>dat &lt;- read.table(text = "     candname party elecVotes
  1 BarackObama     D       365
  2  JohnMcCain     R       173", header = TRUE)
  </code></pre>
  
  <p>But if the data has strings with spaces like this:</p>
  
  <pre><code>      candname party elecVotes
  1 Barack Obama     D       365
  2  John McCain     R       173
  </code></pre>
  
  <p>Then <code>read.table</code> throws an error as it interprets "Barack" and "Obama" as two separate variables.</p>