sentiment_score: sentiment_score

Description Usage Arguments Value

View source: R/sentiment_score.R

Description

Return a sentiment score for each response, in a variety of different ways

Usage

1
sentiment_score(data, column, output = "", display = "simple")

Arguments

data

dataframe or tibble with a row per survey response

column

name of a character column in the data frame which can be used to calculate the sentiment

output

string representing the name of the new sentiment column, defaults to '[column]_sentiment'

display

string denoting whether the sentiment should be represented by: words denoting the sentiment ('simple' - the default) the actual score ('num') or the sentiment of every response should be ranked with a higher rank denoting more positive sentiment i.e. 1 being the most positive ('rank')

Value

Original dataframe with an additional column denoting the sentiment of the response


chrisbrownlie/surveyr documentation built on Dec. 1, 2019, 12:34 a.m.