Learn R Programming

SentimentAnalysis (version 1.3-4)

rulePositivity: Ratio of positive words

Description

Ratio of words labeled as positive in that dictionary compared to the total number of words in the document. Here, it uses the entry positiveWords of the SentimentDictionaryBinary.

Usage

rulePositivity(dtm, d)

Value

Ratio of positive words compared to all

Arguments

dtm

Document-term matrix

d

Dictionary of type SentimentDictionaryBinary