title: Importing csv file into R - numeric values read as characters
body: <p>I am aware that there are similar questions on this site, however, none of them seem to answer my question sufficiently. </p>
  
  <p>This is what I have done so far: </p>
  
  <p>I have a csv file which I open in excel. I manipulate the columns algebraically to obtain a new column "A". I import the file into R using <code>read.csv()</code> and the entries in column A are stored as factors - I want them to be stored as numeric. I find this question on the topic:</p>
  
  <p><a href="https://stackoverflow.com/questions/5187745/imported-a-csv-dataset-to-r-but-the-values-becomes-factors">Imported a csv-dataset to R but the values becomes factors</a></p>
  
  <p>Following the advice, I include <code>stringsAsFactors = FALSE</code> as an argument in <code>read.csv()</code>, however, as Hong Ooi suggested in the page linked above, this doesn't cause the entries in column A to be stored as numeric values. </p>
  
  <p>A possible solution is to use the advice given in the following page:</p>
  
  <p><a href="https://stackoverflow.com/questions/3418128/how-to-convert-a-factor-to-an-integer-numeric-without-a-loss-of-information">How to convert a factor to an integer\numeric without a loss of information?</a></p>
  
  <p>however, I would like a cleaner solution i.e. a way to import the file so that the entries of column entries are stored as numeric values.</p>
  
  <p>Cheers for any help!</p>