positivity: Positivity (AFINN) Score

Description Usage Arguments Examples

View source: R/clickbait_functions.R

Description

This function takes in any dataframe with headline and ids variables and returns a new dataframe containing the variable positivity, which an integer that represents the total AFINN score associated with each headline. Scores of 0 represent neutral headlines, or headlines not containing any words within the AFINN wordbank.

Usage

1

Arguments

ds

dataset

Examples

1
2
3
4
## Not run: 
articles_positivity <- positivity(articles)

## End(Not run)

leahannejohnson/textclassificationexamples documentation built on Feb. 7, 2022, 11:04 p.m.