hash_sentiment: Tweet Analyser

Description Usage Arguments Examples

Description

This function scrapes twitter for your chosen phrase, and outputs a summary of the most positive or negative tweets

Usage

1
2
3
hash_sentiment(regex = "coriander|cilantro", num.tweets = 800,
  method = "afinn", sentiment = "positive", num.summary = 6,
  scrape = TRUE)

Arguments

regex

Regular expression for the words/phrase you are interested in. Twitter will be scraped for this regex.

num.tweets

How many tweets should be fetched? Currently, only the latest tweets can be scraped.

method

Sentiment Analysis method. Options include "nrc" which assigns words to 8 emotions and 2 sentiments or "afinn" which assigns a positive numeric score to positive words and negative scores to negative words. Only 'afinn' works right now.

sentiment

Choose between "positive" or "negative" sentiment summary

num.summary

The number of tweets to be summarised from the 'most positive' or 'most negative' list

Examples

1
2
3
hash_sentiment(regex = "coriander|cilantro", num.tweets = 200,
method = "afinn", sentiment = "positive",
num.summary = 6)

sk6aus6/hashtag documentation built on May 30, 2019, 12:07 a.m.