开始使用免费开始使用

统计情感

已为您加载 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
  ___(___)
编辑并运行代码