Skip to content

Instantly share code, notes, and snippets.

View Nikunj-Goyal's full-sized avatar
🎯
Focusing

Nikunj-Goyal

🎯
Focusing
View GitHub Profile
@geoffjentry
geoffjentry / gist:8226180
Last active March 2, 2021 06:36
Remove retweets
load("code2013.rda")
# Find/remove the tweets flagged as retweets
is_retweets = which(sapply(code2013, function(x) x$getIsRetweet()))
if (length(is_retweets) > 0) {
filtered_tweets = code2013[-is_retweets]
} else {
filtered_tweets = code2013
}