title: Convert currency with commas into numeric
body: <p>I have a column in a dataframe as follows:</p>
  
  <pre><code>COL1
  $54,345
  $65,231
  $76,234
  </code></pre>
  
  <p>How do I convert it into this:</p>
  
  <pre><code>COL1
  54345
  65231
  76234
  </code></pre>
  
  <p>The way I tried it at first was:</p>
  
  <pre><code>df$COL1&lt;-as.numeric(as.character(df$COL1))
  </code></pre>
  
  <p>That didn't work because it said NA's were introduced. </p>
  
  <p>Then I tried it like this: </p>
  
  <pre><code>df$COL1&lt;-as.numeric(gsub("\\$","",as.character(df$COL1)))
  </code></pre>
  
  <p>And the same this happened.</p>
  
  <p>Any ideas?</p>