extract_twitter: Extract hashtag unigrams from tidy Twitter data

Description Usage Arguments Value Examples

Description

A function to create a unigram model of hashtags/handles from a tidy data frame of Twitter data, and is a convenience function based around tidytext functions

Usage

1
extract_twitter(corpus, tag = "hashtag")

Arguments

corpus

A data frame containing columns for title and text

tag

A data frame containing stop words, expect "hashtag" or "handle"

Value

A data frame containing Twitter hashtags or handles

Examples

1
2
3
4
5
6
## Not run: 
tweets <- read.csv("tweets.csv", header=FALSE)
hashtags <- extract_hashtags(tweets)
handles <- extract_hashtags(tweets,tag="handle")

## End(Not run)

cldatascience/tidygramr documentation built on May 10, 2019, 1:09 a.m.