Description Usage Arguments Value
View source: R/aggregate-sentiment.R
Get statistics for sentiment over some group, such as sentence.
1 2 3 4 5 6 7 | aggregate_sentiment(
.data,
aggregate_on,
lexicon = "afinn",
statistic = mean,
to_scale = FALSE
)
|
.data |
character vector of words |
aggregate_on |
vector to aggregate .data over; ideally, sentence_id, but could be chapter, document, etc. |
lexicon |
as per term sentiment |
statistic |
function that accepts na.rm argument; e.g. mean, median, sd. |
sentiment of same length as input vector aggregated over the aggregate_on vector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.