Description Usage Arguments Details Value
View source: R/sentiment_stanford_by.R
Approximate the sentiment (polarity) of text by grouping variable(s).
1 2 | sentiment_stanford_by(text.var, by = NULL,
averaging.function = stansent::average_downweighted_zero, group.names, ...)
|
text.var |
The text variable. |
by |
The grouping variable(s). Default |
averaging.function |
A function for performing the group by averaging.
The default, |
group.names |
A vector of names that corresponds to group. Generally for internal use. |
... |
Other arguments passed to |
Note that the coreNLP is expensive with regard to time. Typically it is
better to use sentiment_stanford
and do the merging and aggregation/summarization
yourself.
Returns a data.table with grouping variables plus:
element_id - The id number of the original vector passed to sentiment
sentence_id - The id number of the sentences within each element_id
word_count - Word count sum
med by grouping variable
sd - Standard deviation (sd
) of the sentiment/polarity score by grouping variable
ave_sentiment - Sentiment/polarity score mean
average by grouping variable
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.