情感分析代码无法正常工作会在r中引发以下错误

时间:2018-04-19 03:12:25

标签: r dplyr tidyr sentiment-analysis

当我尝试执行代码时,这是我得到的错误bingSent。 这是代码文件。

afinSent <- text_df %>%
  inner_join(afin) %>%
  group_by(index = date) %>%
  summarise(sentiment = sum(score))
# Joining, by = "word"
bingSent <- text_df %>%
   inner_join(bing) %>%
   count(index = date, sentiment) %>%
   spread(sentiment, n, fill = 0) %>%
   mutate(sentiment = positive - negative)
# Joining, by = "word"
# Error in enc2utf8(col_names(col_labels, sep = sep)) : 
#   argument is not a character vector

enter link description here

0 个答案:

没有答案