title: Factor into numeric in R
body: <p>I'm completely new to "R" (so this might seem a little basic) 
  I've extracted some data from the World Health Organization's but am struggling to convert a row of data which has some of the data points classed as factors and some as numerics. </p>
  
  <p><strong>Firstly, I've isolated a row of data that represents private health expenses by year (between 2003 and 2014)</strong></p>
  
  <pre><code> &gt; private_exp
     2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014
   32 41.3 41.3 38.6 37.8 36.9   33 33.4 33.6 30.4 28.2 28.2 25.3
  </code></pre>
  
  <p><strong>When I looked at the structure of the data I noticed that some of the data points are listed as numberics while others are listed as factors (which I found odd).</strong> </p>
  
  <pre><code>&gt; str(private_exp)
  'data.frame':   1 obs. of  12 variables:
   $ 2003: Factor w/ 23 levels "","0","0.2","14.1",..: 15
   $ 2004: Factor w/ 20 levels "","0.2","107",..: 15
   $ 2005: Factor w/ 21 levels "","&amp;gt;90","0.2",..: 15
   $ 2006: num 37.8
   $ 2007: Factor w/ 17 levels "","0.9","15",..: 9
   $ 2008: num 33
   $ 2009: num 33.4
   $ 2010: num 33.6
   $ 2011: Factor w/ 20 levels "","0.7","13.4",..: 12
   $ 2012: num 28.2
   $ 2013: num 28.2
   $ 2014: num 25.3
  </code></pre>
  
  <p><strong>I don't really understand how one data point, say for 2003 can be a factor with 23 levels when really its just a number. Anyway - I tried changing it to a numeric and didn't really understand the output.</strong> </p>
  
  <pre><code>&gt; as.numeric(private_exp$`2003`)
  [1] 15
  </code></pre>
  
  <p><strong>And it still seems to be a factor:</strong> </p>
  
  <pre><code>&gt; private_exp$`2003`
  [1] 41.3
  23 Levels:  0 0.2 14.1 16.9 2 21.6 2617 2864 3.89 32.3 ... No data
  &gt; class(private_exp$`2003`)
  [1] "factor"
  </code></pre>
  
  <p>This is my first atempt at doing anything with R - I'm clearly missing something. Any help would be greatly appreciated. </p>