Learn R Programming

SentimentAnalysis (version 1.1-0)

numNegativeEntries: Number of negative words in dictionary

Description

Counts total number of negative entries in dictionary.

Usage

numNegativeEntries(d)

Arguments

See Also

numEntries and numPositiveEntries for more option to count the number of entries

Examples

Run this code
numNegativeEntries(SentimentDictionary(c("increase", "rise", "more"),
                            c("fall", "drop"))) # returns 2
numNegativeEntries(SentimentDictionary(c("increase", "decrease", "exit"),
                               c(+1, -1, -10),
                               rep(NA, 3))) # returns 2

Run the code above in your browser using DataLab