Loading Loughran finance sentiment into Tidytext -


i'm using sentiment tools in tidytext first time, , use loughran dictionary. after several attempts, closest error:

get_sentiments("loughran") error in get_sentiments("loughran") : not find function "%>%"

is loughran tidytext offering or must externally retrieved/loaded? thank you.

the loughran sentiment lexicon in version of tidytext on github not yet on cran. releasing new version on cran in near future! in meantime, can install current development version of tidytext github using devtools:


library(devtools) install_github("juliasilge/tidytext")   library(tidytext) get_sentiments("loughran") #> # 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 #> # ... 4,139 more rows 

Comments

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

android - ConstraintLayout: Realign baseline constraint in case if dependent view visibility was set to GONE -

c# - Populating Gridview inside Listview ItemTemplate On Web User Control from Code Behind -