How to scrape a table with rvest and xpath?
<p>using the following <a href="http://www.r-bloggers.com/using-rvest-to-scrape-an-html-table/" rel="noreferrer">documentation</a> i have been trying to scrape a series of tables from marketwatch.com </p>

<p>here is the one represented by the code bellow: </p>

<p><a href="https://i.stack.imgur.com/ak9iH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ak9iH.png" alt="enter image description here"></a></p>

<p>The link and xpath are already included in the code:</p>

<pre><code>url &lt;- "http://www.marketwatch.com/investing/stock/IRS/profile"
valuation &lt;- url %&gt;%
  html() %&gt;%
  html_nodes(xpath='//*[@id="maincontent"]/div[2]/div[1]') %&gt;%
  html_table()
valuation &lt;- valuation[[1]]
</code></pre>

<p>I get the following error: </p>

<pre><code>Warning message:
'html' is deprecated.
Use 'read_html' instead.
See help("Deprecated") 
</code></pre>

<p>Thanks in advance. </p>