title: readHTMLTable returns incomplete data set
body: <p>There was a question a few days ago from a user that brought up something fairly interesting. Please see  <a href="https://stackoverflow.com/questions/23230687/how-to-use-readhtmltable-without-cutting-off-first-row">How to use readHTMLTable without cutting off first row</a> for the original question.</p>
  
  <p>I've been somewhat intrigued by the strange behavior being exhibited by the <code>header</code> argument in <code>readHTMLTable</code> (package <code>XML</code>).  Before I go any further, I can confirm that I have been through the documentation and it states that</p>
  
  <blockquote>
    <p>"The methods attempt to do some heuristic computations to determine
    the header labels for the columns, the name of the table, etc."</p>
  </blockquote>
  
  <p>Okay, so I can expect that the <code>header</code> argument may not always return an optimal result.  By the way, does that only apply to the header argument? Or might the entire table not be optimal?</p>
  
  <p>Well, after a bit of investigation, I find that the complete table will not be optimal. It will only be returned complete when <code>header = FALSE</code>.  Setting <code>header = TRUE</code> or leaving it blank (<code>header = NA</code>) results in a table that is <strong>missing the first row of data</strong>.  </p>
  
  <p>The data table for this problem is at <a href="http://www.nfl.com/stats/categorystats?archive=false&amp;conference=null&amp;statisticPositionCategory=FIELD_GOAL_KICKER&amp;season=2013&amp;seasonType=REG&amp;experience=&amp;tabSeq=1&amp;qualified=false&amp;Submit=Go" rel="nofollow noreferrer">NFL.com</a></p>
  
  <p>Let's have a look... </p>
  
  <pre><code>URL &lt;- "http://www.nfl.com/stats/categorystats?archive=false&amp;conference=null&amp;statisticPositionCategory=FIELD_GOAL_KICKER&amp;season=2013&amp;seasonType=REG&amp;experience=&amp;tabSeq=1&amp;qualified=false&amp;Submit=Go"
  library(XML)
  ## missing first row of table
  head(readHTMLTable(URL)$result[1:10], 3)  
  ##   V1             V2  V3 V4 V5 V6 V7 V8 V9 V10
  ## 1  1  Justin Tucker BAL  K 38 41 93  0 61 0-0
  ## 2  3 Adam Vinatieri IND  K 35 40 88  1 52 0-0
  ## 3  4     Nick Novak  SD  K 34 37 92  2 50 1-1
  
  ## missing first row of table
  head(readHTMLTable(URL, header = TRUE)$result[1:10], 3) 
  ##   V1             V2  V3 V4 V5 V6 V7 V8 V9 V10
  ## 1  1  Justin Tucker BAL  K 38 41 93  0 61 0-0
  ## 2  3 Adam Vinatieri IND  K 35 40 88  1 52 0-0
  ## 3  4     Nick Novak  SD  K 34 37 92  2 50 1-1
  </code></pre>
  
  <p>Now let's change to <code>header = FALSE</code>.  Here we find that the first row of the table is now included. </p>
  
  <p><strong>This is the complete table.</strong> </p>
  
  <pre><code>## returns complete table
  head(readHTMLTable(URL, header = FALSE)$result[1:10], 3) 
  ##   V1                 V2  V3 V4 V5 V6 V7 V8 V9 V10
  ## 1  1 Stephen Gostkowski  NE  K 38 41 93  0 54 1-1
  ## 2  1      Justin Tucker BAL  K 38 41 93  0 61 0-0
  ## 3  3     Adam Vinatieri IND  K 35 40 88  1 52 0-0
  </code></pre>
  
  <p>To reiterate, the complete set of data will only be returned if <code>header</code> is set to <code>FALSE</code>.</p>
  
  <p>I realize it's not easy to grab HTML and XML tables perfectly.  But I'm missing the #1 kicker in the NFL in my data (insert "He's only a kicker, who cares?" jokes here).</p>
  
  <p>Has anyone seen behavior like this before from an R function? Is there logic behind this scenario?  Is it specific to this particular website, perhaps?  I can test it on others, but not all of them. The <code>XML</code> package is great, but this makes me a bit uneasy.  </p>
  
  <p><strong>Session Info (partial)</strong></p>
  
  <pre><code>&gt; sessionInfo()
  ## R version 3.1.0 (2014-04-10)
  ## Platform: x86_64-pc-linux-gnu (64-bit)
  </code></pre>