numPositiveEntries: Number of positive words in dictionary

Description Usage Arguments Note See Also Examples

Description

Counts total number of positive entries in dictionary.

Usage

1

Arguments

d

is a dictionary of type SentimentDictionaryBinary or SentimentDictionaryWeighted

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

1
2
3
4
5
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

SentimentAnalysis documentation built on April 10, 2018, 1:03 a.m.