numPositiveEntries {SentimentAnalysis} | R Documentation |
Number of positive words in dictionary
Description
Counts total number of positive entries in dictionary.
Usage
numPositiveEntries(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
numNegativeEntries
for more option to count the number of entries
Examples
numPositiveEntries(SentimentDictionary(c("increase", "rise", "more"),
c("fall", "drop"))) # returns 3
numPositiveEntries(SentimentDictionary(c("increase", "decrease", "exit"),
c(+1, -1, -10),
rep(NA, 3))) # returns 1
[Package SentimentAnalysis version 1.3-5 Index]