Learn R Programming

twitteR (version 1.1.9)

strip_retweets: A function to remove retweets

Description

Given a list of status objects, will remove retweets from the list to provide a "pure" set of tweets.

Usage

strip_retweets(tweets, strip_manual = TRUE, strip_mt = TRUE)

Arguments

tweets
A list of status objects
strip_manual
If TRUE will remove old style manual retweets
strip_mt
If TRUE will remove modified tweets (MT)

Value

A list of status objects with retweeted content removed

Details

Newer style retweets are summarily removed regardless of options.

Older style retweets (aka manual retweets) are tweets of the form RT @user blah blah. If strip_manual is TRUE, tweets containing the RT string will have everything including and to the right of the RT will be removed. Everything to the left of the RT will remain, as this should be original content.

If strip_mt is TRUE, tweets will be stripped in the same manner as strip_manual but using the string MT

See Also

status

Examples

Run this code
  ## Not run: 
#     tweets = searchTwitter("stuff")
#     no_retweets = strip_retweets(tweets)
#   ## End(Not run)

Run the code above in your browser using DataLab