我第一次使用Tidytext中的情感工具,并且想使用Loughran字典。经过几次尝试,我得到的最接近的错误是:
get_sentiments("loughran") get_sentiments("loughran")中的错误:找不到函数"%>%“
Loughran是Tidytext提供的还是必须外部检索/加载?谢谢。
发布于 2017-04-07 19:29:53
Loughran情感词典是在GitHub上的tidytext版本中,但还没有在CRAN上。我们将在不久的将来发布一个新版本的CRAN!同时,您可以使用devtools从GitHub安装tidytext的当前开发版本:
library(devtools)
install_github("juliasilge/tidytext")
library(tidytext)
get_sentiments("loughran")
#> # A tibble: 4,149 × 2
#> word sentiment
#> <chr> <chr>
#> 1 abandon negative
#> 2 abandoned negative
#> 3 abandoning negative
#> 4 abandonment negative
#> 5 abandonments negative
#> 6 abandons negative
#> 7 abdicated negative
#> 8 abdicates negative
#> 9 abdicating negative
#> 10 abdication negative
#> # ... with 4,139 more rowshttps://stackoverflow.com/questions/43282771
复制相似问题