Learn R Programming

SentimentAnalysis (version 1.3-4)

extractWords: Extract words from dictionary

Description

Returns all entries from a dictionary.

Usage

extractWords(d)

Arguments

d

Dictionary of type SentimentDictionaryWordlist, SentimentDictionaryBinary or SentimentDictionaryWeighted

Examples

Run this code
extractWords(SentimentDictionary(c("uncertain", "possible", "likely"))) # returns 3
extractWords(SentimentDictionary(c("increase", "rise", "more"),
                                 c("fall", "drop"))) # returns 5
extractWords(SentimentDictionary(c("increase", "decrease", "exit"),
                                 c(+1, -1, -10),
                                 rep(NA, 3))) # returns 3

Run the code above in your browser using DataLab