เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

Read in HTML

Take a look at the following excerpt from a website:


Web Scraping is cool

It involves writing code – be it R or Python.

DataCamp has courses on it.


The corresponding HTML is provided to you in the html_excerpt_raw variable.

In this exercise you'll use rvest to read it into R, so you can work with it.

As you are working with the rvest package during this entire course, it will always have been preloaded for you with the library(rvest) command.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Web Scraping in R

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

html_excerpt_raw <- '
 
   
    

Web scraping is cool

It involves writing code – be it R or Python.

DataCamp has courses on it.

' # Turn the raw excerpt into an HTML document R understands html_excerpt <- ___ html_excerpt
แก้ไขและรันโค้ด