numNegativeEntries {SentimentAnalysis} | R Documentation |
Number of negative words in dictionary
Description
Counts total number of negative entries in dictionary.
Usage
numNegativeEntries(d)
Arguments
d |
is a dictionary of type |
Note
Entries in SentimentDictionaryWeighted
with a weight of 0
are not counted here
See Also
numEntries
and
numPositiveEntries
for more option to count the number of entries
Examples
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
[Package SentimentAnalysis version 1.3-5 Index]