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 is 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
articles_positivity <- positivity(articles)

phebepalmer/textclassificationexamples documentation built on Aug. 22, 2020, 12:11 a.m.