title: Remove thousand's separator
body: <p>I imported an Excel file and got a data frame like this</p>
  
  <pre><code>structure(list(A = structure(1:3, .Label = c("1.100", "2.300", 
  "5.400"), class = "factor"), B = structure(c(3L, 2L, 1L), .Label = c("1.000.000", 
  "500", "7.800"), class = "factor"), C = structure(1:3, .Label = c("200", 
  "3.100", "4.500"), class = "factor")), .Names = c("A", "B", "C"
  ), row.names = c(NA, -3L), class = "data.frame")
  </code></pre>
  
  <p>I would now like to convert these <code>chars</code> to <code>numeric</code> or even <code>integer</code>. However, the dot character (<code>.</code>) is not a decimal sign but a "thousand's separator" (it's German).</p>
  
  <p>How would I convert the data frame properly?</p>
  
  <p>I tried this:</p>
  
  <pre><code>df2 &lt;- as.data.frame(apply(df1, 2, gsub, pattern = "([0-9])\\.([0-9])", replacement= "\\1\\2"))
  
  df3 &lt;- as.data.frame(data.matrix(df2))
  </code></pre>
  
  <p>however, <code>apply</code> seems to convert each column to a list of factors. Can I maybe prevent <code>apply</code> from doing so?</p>