Description Usage Arguments Value Examples
Get specific sentiment lexicons in a tidy format, with one row per word,
in a form that can be joined with a one-word-per-row dataset.
The "bing"
option comes from the included sentiments
data frame, and others call the relevant function in the textdata
package.
1 | get_sentiments(lexicon = c("bing", "afinn", "loughran", "nrc"))
|
lexicon |
The sentiment lexicon to retrieve; either "afinn", "bing", "nrc", or "loughran" |
A tbl_df with a word
column, and either a sentiment
column (if lexicon
is not "afinn") or a numeric score
column
(if lexicon
is "afinn").
1 2 3 4 5 6 7 8 9 | library(dplyr)
get_sentiments("bing")
## Not run:
get_sentiments("afinn")
get_sentiments("nrc")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.