Plots a emotion object.
# S3 method for emotion
plot(
x,
transformation.function = syuzhet::get_dct_transform,
drop.unused.emotions = TRUE,
facet = TRUE,
...
)
The emotion object.
A transformation function to smooth the emotion scores.
logical. If TRUE
unused/unfound emotion
levels will not be included in the output.
logical or one of c('emotion', 'negated')
. If TRUE
or 'emotion'
the plot will be facetted by Emotion Type. If FALSE
all types will be plotted in the same window. If "negated"
the emotions
will be in the same plot window but broken out by negated or non-negated types.
Other arguments passed to get_transformed_values
.
Returns a ggplot2 object.
Utilizes Matthew Jocker's syuzhet package to calculate smoothed emotion across the duration of the text.