title: Convert Factors in 2 Data Frames of a List into Numeric
body: <p>I am having trouble converting the columns of 2 data frames in a list to numeric.  Right now both data frames have 2 columns consisting of factors.  I want to convert them to numeric so that I can do mathematical operations on them.  Below is sample code:</p>
  
  <pre><code>library(XML)
  
  bal &lt;- "http://www.baseball-reference.com/teams/BAL/2014-schedule-scores.shtml"
  bos &lt;- "http://www.baseball-reference.com/teams/BOS/2014-schedule-scores.shtml"
  
  mylist &lt;- list(bal, bos)
  
  a &lt;- lapply(mylist, readHTMLTable)
  b &lt;- lapply(a, function(x) x[["team_schedule"]][, c("R", "RA")])
  c &lt;- as.numeric(as.character(b))
  </code></pre>
  
  <p>When I run this code I get:</p>
  
  <pre><code>&gt; c
  [1] NA NA
  &gt; str(c)
   num [1:2] NA NA
  </code></pre>
  
  <p>Here is the structure of b:</p>
  
  <pre><code>&gt; str(b)
  List of 2
   $ :'data.frame':   165 obs. of  2 variables:
    ..$ R : Factor w/ 13 levels "","0","10","11",..: 6 6 7 8 10 7 6 5 9 2 ...
    ..$ RA: Factor w/ 13 levels "","0","1","10",..: 3 9 7 4 10 3 7 8 7 6 ...
   $ :'data.frame':   166 obs. of  2 variables:
    ..$ R : Factor w/ 10 levels "","0","1","2",..: 3 8 6 4 8 2 7 9 6 3 ...
    ..$ RA: Factor w/ 13 levels "","1","10","14",..: 5 5 6 9 10 7 2 3 5 7 ...
  </code></pre>
  
  <p>What should I do differently to convert the factors into numeric values?</p>