plot.profanity {sentimentr}R Documentation

Plots a profanity object

Description

Plots a profanity object.

Usage

## S3 method for class '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.

Details

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

Value

Returns a ggplot2 object.


[Package sentimentr version 2.9.0 Index]