title: Why does readHTMLTable cannot successfully read premier league tables for May month?
body: <p>The <a href="http://www.premierleague.com/en-gb.html" rel="nofollow noreferrer">official Premier league website</a> provides data with various statistics for league's teams over seasons (<a href="http://www.premierleague.com/en-gb/matchday/league-table.html?season=2013-2014&amp;month=MAY&amp;timelineView=date&amp;toDate=715215600000&amp;tableView=CURRENT_STANDINGS" rel="nofollow noreferrer">e.g. this one</a>). I used the function <strong><em>readHTMLTable</em></strong> from <a href="https://www.google.rs/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=2&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwi2ovPszs3MAhUGkiwKHUwlBOcQFggkMAE&amp;url=https%3A%2F%2Fcran.r-project.org%2Fweb%2Fpackages%2FXML%2FXML.pdf&amp;usg=AFQjCNGar_hTrONPwwnW_PX41JUF-jkimg&amp;sig2=HGsfcdnzTdoLgQ3-nq-wBA" rel="nofollow noreferrer">XML R package</a> to retrieve those tables. However, I noticed that the function can not read tables for <strong>May months</strong> while for others it works well. Here is an example:</p>
  
  <pre><code>april2007.url &lt;- "http://www.premierleague.com/en-gb/matchday/league-table.html?season=2006-2007&amp;month=APRIL&amp;timelineView=date&amp;toDate=1177887600000&amp;tableView=CURRENT_STANDINGS"
  april.df &lt;- readHTMLTable(april2007.url, which = 1)
  april.df[complete.cases(april.df),] ## correct table
  
  
  march2014.url &lt;- "http://www.premierleague.com/en-gb/matchday/league-table.html?season=2013-2014&amp;month=APRIL&amp;timelineView=date&amp;toDate=1398639600000&amp;tableView=CURRENT_STANDINGS"
  march.df &lt;- readHTMLTable(march2014.url, which = 1)
  march.df[complete.cases(march.df), ] ## correct table
  
  may2007.url &lt;- "http://www.premierleague.com/en-gb/matchday/league-table.html?season=2006-2007&amp;month=MAY&amp;timelineView=date&amp;toDate=1179010800000&amp;tableView=CURRENT_STANDINGS"
  may.df1 &lt;- readHTMLTable(may2007.url, which = 1)
  may.df1 ## Just data for the first team
  
  may2014.url &lt;- "http://www.premierleague.com/en-gb/matchday/league-table.html?season=2013-2014&amp;month=MAY&amp;timelineView=date&amp;toDate=1399762800000&amp;tableView=CURRENT_STANDINGS"
  may.df2 &lt;- readHTMLTable(may2014.url, which =1)
  may.df2 ## Just data for the first team
  </code></pre>
  
  <p>As you can see, the function can not retrieve data for May month. </p>
  
  <p>Please, can someone explain why this happens and how it can be fixed?</p>
  
  <p><strong>EDIT AFTER <a href="https://stackoverflow.com/users/6309235/zyurnaidi">@zyurnaidi</a> answer:</strong></p>
  
  <p>Below is the code that can do the job without manual editing.</p>
  
  <pre><code>url &lt;- "http://www.premierleague.com/en-gb/matchday/league-table.html?season=2009-2010&amp;month=MAY&amp;timelineView=date&amp;toDate=1273359600000&amp;tableView=CURRENT_STANDINGS" ## data for the 09-05-2010.
  
  con &lt;- file (url)
  raw &lt;- readLines (con)
  close (con)
  
  pattern &lt;- '&lt;span class=" cupchampions-league= competitiontooltip= qualifiedforuefachampionsleague=' ## it seems that this part of the webpage source code mess the things up
  
  raw &lt;- gsub (pattern = pattern, replacement = '""', x = raw)
  
  df &lt;- readHTMLTable (doc = raw, which = 1)
  df[complete.cases(df), ] ## correct table
  </code></pre>