BaşlayınÜcretsiz Başlayın

Creating a DTM

Create a document term matrix (DTM) using our tidy_twitter data. In this case, each tweet is considered a document. Print tidy_twitter in the console to confirm the column names.

Bu egzersiz

Introduction to Text Analysis in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Start with the tidied Twitter data.
  • Count each word used in each tweet.
  • Use the word counts by tweet to create a DTM.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Start with the tidied Twitter data
___ %>% 
  # Count each word used in each tweet
  ___(word, ___) %>% 
  # Use the word counts by tweet to create a DTM
  cast_dtm(___, word, n)
Kodu Düzenle ve Çalıştır