title: Data frame incorrect number of dimensions
body: <p>I am new to the R languange and I have an assignment where I should display a boxplot of data from an html table in wikipedia:</p>
  
  <pre><code>library("rvest")
  library("ggplot2")
  library("dplyr")
  url &lt;- "https://en.wikipedia.org/wiki/List_of_countries_by_oil_exports"
  Countries &lt;- url %&gt;%
    read_html() %&gt;%
    html_nodes(xpath='//*[@id="mw-content-text"]/table[2]') %&gt;% 
  html_table(header=TRUE, fill=TRUE)
  Countries &lt;- Countries
  head(Countries)
  str(Countries)
  for(i in 1:74){
       Countries[i,3] = as.numeric(Countries[i,3])
  }
  #ggplot(Oil_Exports) + geom_boxplot() +
  #  ylab("Amount of oil Exports in (bbl/day)") +
  #  opts(title = "List of countries by oil exports")
  </code></pre>
  
  <p>If I am moving correctly I am currently trying to change the values in column 3 for all rows to numeric (Oil - exports (bbl/day)). I get the following error:</p>
  
  <pre><code>List of 1
   $ :'data.frame':   74 obs. of  6 variables:
    ..$ Rank                   : int [1:74] 1 2 3 4 5 6 7 8 9 10 ...
    ..$ Country/Region         : chr [1:74] "Saudi Arabia" "Russia" "Kuwait" "Iran" ...
    ..$ Oil - exports (bbl/day): chr [1:74] "6,880,000" "4,720,000" "2,750,000" "2,445,000" ...
    ..$ Date of
  information   : chr [1:74] "2011 est." "2013 est." "2016 est." "2011 est." ...
    ..$ Oil - exports (bbl/day): chr [1:74] "8,865,000" "7,201,000" "2,300,000" "1,808,000" ...
    ..$ Date of
  information   : int [1:74] 2012 2012 2012 2012 2016 2014 2012 2012 2012 2012 ...
  Error in Countries[i, 3]: incorrect number of dimensions
  Traceback:
  </code></pre>
  
  <p>How to solve the problem and if is there a better way to do it? Thanks.</p>