Web scraping made easy with rvest

By now, I hope you do agree on the importance of understanding something about HTML and HTTP. Now, it's time to trust a query language of greater importance on text mining, XPath. Imagine that you have to navigate through a web page. Looking at the page, you can easily locate the content you are aiming for. How do you tell the computer to look at this same content?

XPath will help you to find and retrieve only some specific content that you are targeting at a web page. Let's say that you want to know all the packages available at CRAN, but calling available.packages() is too easy for you. You want to scrape this content directly from CRAN's web page using rvest.

Follow to the CRAN web page right into the ...

Get Hands-On Data Science with R now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.