clean_text: Clean tweet text

Description Usage Arguments Author(s) See Also Examples

Description

Prepares tweets for text analysis by removing usernames (@user), URLs (http://...), new lines, breaks and special symbols. Expands contractions (e.g. "won't" to "will not", "I've" to "I have", etc.).

Usage

1
clean_text(content)

Arguments

content

A vector of strings (for instance get_pw_tweets()$content)

Author(s)

Katya Ognyanova rstats@ognyanova.net

See Also

get_pw_tweets get_pw_pol merge_pw

Examples

1
2
3
4
5
6
7
8
 ## Not run: 

tweet.df <- get_pw_tweets(1, 5)
tweet.df$clean <- clean_text(tweet.df$content)


## End(Not run)
 

kateto/PolitwoopsR documentation built on May 20, 2019, 7:41 a.m.