title: R cannot use hist() because "content not numeric" due to negative decimal numbers?
body: <p>I am new to R and I am trying to draw a histogram using hist() of a list of 100,000 numbers like this</p>
  
  <pre><code>-0.764
  -0.662
  -0.764
  -0.019
  0.464
  0.668
  0.464
  </code></pre>
  
  <p>but I cannot do it because R complains that the content is not numeric. This is what I've tried: </p>
  
  <ul>
  <li><p>I read the file using <code>t &lt;- read.table(file= "file.txt", sep = "\n", dec = ".", header = TRUE)</code>, the data loads and looks well (I get the same values)</p></li>
  <li><p>I tried to make it numeric using <code>as.numeric(c(t[,1])), sapply(t, as.numeric)</code>, but I get completely different numbers, like </p>
  
  <p>53  428  791  428  582  428  979  428  456  533  550</p></li>
  </ul>
  
  <p>I think their might be a problem with the decimal point "." or the negative signs "-" or both. 
  Any ideas?</p>
  
  <p>Many thanks! </p>