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

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -