始める無料で始める

感情のカウント

tidy_twitter データセットは読み込まれています。Twitter データでどの感情が多いのかを確認してみましょう。

この演習はコースの一部です

Rで始めるテキスト分析

コースを見る

演習の手順

  • tidy_twitter と NRC 感情辞書を結合します。
  • sentiment_twitter 内の感情をカウントします。
  • 感情の件数を降順に並べ替えます。

実践的なインタラクティブ演習

このサンプルコードを完成させて、この演習に挑戦してみましょう。

# Join tidy_twitter and the NRC sentiment dictionary
sentiment_twitter <- ___ %>% 
  ___(___("nrc"))

# Count the sentiments in sentiment_twitter
___ %>% 
  ___(___) %>% 
  # Arrange the sentiment counts in descending order
  ___(___)
コードを編集して実行