title: Number values include comma -- how do I make these numeric?
body: <p>I have a whole column of numbers that include comma separators at the thousands. When I try to create a numeric column out of them, anything over 999 becomes NA.</p>
  
  <p>I used cbind:</p>
  
  <pre><code>df &lt;- cbind(df, var2 = as.numeric(as.character(df$var1)))
  </code></pre>
  
  <p>and wound up with:</p>
  
  <pre><code>        var1  var2
  1   2,518.50    NA
  2   2,518.50    NA
  3   5,018.50    NA
  4   4,018.50    NA
  5  10,018.50    NA
  6     318.50 318.5
  7   2,518.50    NA
  8   3,518.50    NA
  9   7,518.50    NA
  10  1,018.50    NA
  </code></pre>
  
  <p>Is there a way to strip the commas or tell <code>as.numeric</code> how to handle them?</p>