sentiment.status: Calculates sentiment score for twitter status object.

Description Usage Arguments See Also Examples

View source: R/sentiment.R

Description

Splits string into words (by default at space), looks up affinity score for each word and returns average

Usage

1
2
  ## S3 method for class 'status'
 sentiment(x, ...)

Arguments

x

Object of class status, originating in package twitteR. See also searchTwitter

...

Passed to sentiment.default

See Also

Other sentiment.functions: sentiment

Examples

1
2
3
4
5
if(require(twitteR)){
tweets  <- searchTwitter("#mcdonalds", n=25)
sentiment(tweets[[1]])
sapply(tweets, sentiment)
}

andrie/sentiment documentation built on June 3, 2017, 7:03 p.m.