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

Getting the play into R

We've already downloaded the play and put the text file in your workspace. Your first step is to read the play into R using stri_read_lines().

You should take a look at the original text file: importance-of-being-earnest.txt

You'll see there is some foreword and afterword text that Project Gutenberg has added. You'll want to remove that, and then split the play into the introduction (the list of characters, scenes, etc.) and the main body.

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

String Manipulation with stringr in R

ดูคอร์ส

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

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

# Read play in using stri_read_lines()
earnest <- ___
แก้ไขและรันโค้ด