title: R mistreat a number as a character
body: <p>I am trying to read a series of text files into R. These files are of the same form, at least appear to be of the same form. Everything is fine except one file. When I read that file, R treated all numbers as characters. I used as.numeric to convert back, but the data value changed. I also tried to convert text file to csv and then read into R, but it did not work, either. Did any one have such problem before, please? How to fix it, please? Thank you!</p>
  
  <p>The data is from Human Mortality Database. I cannot attach the data here due to copyright issue. But everyone can register through HMD and download data (www.mortality.org). As an example, I used Australian and Belgium 1 by 1 exposure data.</p>
  
  <p>My codes are as follows:</p>
  
  <pre><code>AUSe&lt;-read.table("AUS.Exposures_1x1.txt",skip=1,header=TRUE)[,-5]
  BELe&lt;-read.table("BEL.Exposures_1x1.txt",skip=1,header=TRUE)[,-5]
  </code></pre>
  
  <p>Then I want to add some rows in the above data frame or matrix. It is fine for Australian data (e.g, <code>AUSe[1,3]+AUSe[2,3]</code>). But error occurred when same command is applied to Belgium data: Error in <code>BELe[1, 3] + BELe[2, 3]</code> : non-numeric argument to binary operator. But if you look at the text file, you know those are two numbers. It is clear that R treated a number as a character when reading the text file, which is rather odd.</p>