Sentiment_by function

问题描述 投票:0回答:1

我正在收集某些Twitter信息的情感数据。此外,我一直在使用函数sendiment_by以便按列对信息进行分组。

sent<-sentiment_by(tidy_libros_stopwords$word, by=tidy_libros_stopwords$screen_name)

enter image description here现在我需要按两列(screen_name和created_at)进行分组的问题,我已经尝试过了,但是不起作用

sent<-sentiment_by(tidy_libros_stopwords$word, by=tidy_libros_stopwords$screen_name,tidy_libros_stopwords$created_at)
r twitter sentiment-analysis sentimentr
1个回答
0
投票

by参数需要一个列表,如果提供了多个分组变量。试试这个:by=list(tidy_libros_stopwords$screen_name,tidy_libros_stopwords$created_at))

© www.soinside.com 2019 - 2024. All rights reserved.