sentimentr (version 2.6.1)

plot.profanity: Plots a profanity object

Description

Plots a profanity object.

Usage

# S3 method for profanity
plot(x,
  transformation.function = syuzhet::get_dct_transform, ...)

Arguments

x

The profanity object.

transformation.function

A transformation function to smooth the profanity scores.

Other arguments passed to get_transformed_values.

Value

Returns a ggplot2 object.

Details

Utilizes Matthew Jocker's syuzhet package to calculate smoothed profanity across the duration of the text.