title: Trying to convert a "chr" column to numeric leads to column full of NAs in R
body: <p>Thank you in advance for your help!</p>
  
  <p>I need to convert the x.1 column to numeric, to having double float numbers in.</p>
  
  <p>What I have done:
  1. I imported the data with: 
  <code>training &lt;- read.csv("training_grover.csv", stringsAsFactors = FALSE, sep = ";")</code></p>
  
  <ol start="2">
  <li><code>str(training)</code></li>
  </ol>
  
  <p>Result: <code>data.frame':   2671 obs. of  22 variables:
   $ X   : int  0 1 2 3 4 5 6 7 8 9 ...
   $ x.0 : chr  "b" "a" "a" "b" ...
   $ x.1 : chr  "30,83" "58,67" "24,5" "27,83" ...
   $ x.2 : chr  "f" "4.46" "0.5" "1.54" ...
   $ x.3 : chr  "u" "u" "u" "u" ...
   $ x.4 : chr  "g" "g" "g" "g" ...
   $ x.5 : chr  "w" "q" "q" "w" ...
   $ x.6 : chr  "v" "h" "h" "v" ...
   $ x.7 : chr  "1.25" "3.04" "1.5" "3.75" ...
   $ x.8 : chr  "t" "t" "t" "t" ...
   $ x.9 : chr  "t" "t" "f" "t" ...
   $ x.10: chr  "t" "6" "f" "5" ...
   $ x.11: chr  "f" "f" "f" "t" ...
   $ x.12: chr  "g" "g" "g" "g" ...
   $ x.13: chr  "202.0" "43.0" "280.0" "100.0" ...
   $ x.14: chr  "f" "560" "824" "3" ...
   $ x.20: chr  "t" "t" "t" "t" ...
   $ x.17: chr  "116,94256980957068" "225,60625307204938" "92,08407670672422" "104,16291777029285" ...
   $ x.18: chr  "0,5787085579422866" "25,409645364400404" "2,3173371593153314" "8,04533772976642" ...
   $ x.19: chr  "202000.0" "43000.0" "280000.0" "100000.0" ...
   $ x.16: chr  "f" "f" "f" "f" ...
   $ y   : chr  "good" "good" "good" "good" ..</code></p>
  
  <ol start="3">
  <li><p>I tried to convert the x.1 column to numeric:</p>
  
  <p><code>training$x.1=as.numeric(training$x.1)</code>
  As result I got the x.1 full of NAs</p></li>
  </ol>
  
  <p>Actions:</p>
  
  <p>a. I imported again the file</p>
  
  <p>b. I removed the "," from the x.1:
      <code>str_replace_all(training$x.1, ",", ".")</code></p>
  
  <p>c. Trying again to convert the x.1 column:
      <code>training$x.1=as.numeric(training$x.1)</code>
       As result I still get x.1 full of NAs</p>
  
  <p>d. Import again the file</p>
  
  <p>e.  I removed the "," from the x.1:
      <code>str_replace_all(training$x.1, ",", ".")</code></p>
  
  <p>f. Trying again to convert the x.1 column:
      <code>training$x.1= as.numeric(as.factor(training$x.1))</code>.
       Result: x.1 column is still full of NAs.</p>
  
  <p>What I am doing wrong here?
  Thank you!</p>