emoDataframeMaker: EMO dataframe maker

Description Usage Arguments Details Value See Also Examples

View source: R/functions.R

Description

Given input text outputs a dataframe of sentiment scores.

Usage

1
2
emoDataframeMaker(text, sentimentType = "syuzhet", addColor = FALSE,
  nrc = FALSE)

Arguments

text

Input text, typically a long-form document

sentimentType

Type of sentiment analysis - an argument to syuzhet::get_sentiment, Default: 'syuzhet'

addColor

Add a column with a colour code to indicate sentiment, Default: FALSE

nrc

Add 8 columns with intensity scores for each of the emotions in the NRC emotion lexicon, Default: FALSE

Details

Calculates sentence-by-sentence and cumulative sentiment scores for a given document.

Value

A dataframe where each row is a sentence with columns for the original text, sentiment score of the sentinence and cumulative sentiment score of the volume.

See Also

get_sentences,get_sentiment,get_nrc_sentiment

Examples

1
2
3
4
5
6
## Not run: 
if (interactive()) {
  # EXAMPLE1
}

## End(Not run)

DataStrategist/thePlotThickens documentation built on May 23, 2021, 1:02 p.m.