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

Create a document term matrix

The document term matrix or DTM is a matrix representation of a corpus.

Creating the DTM from the text corpus is the first step towards building a topic model.

Can you create a DTM from the pre-loaded corpus on "Climate change" called corpus_climate?

The library tm has been pre-loaded for this exercise.

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

Analyzing Social Media Data in R

ดูคอร์ส

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

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

# Create a document term matrix (DTM) from the pre-loaded corpus
dtm_climate <- ___(___)
dtm_climate
แก้ไขและรันโค้ด