Tweets is a dataframe with lots of tweets.
by(tweets, tweets$query, function(y) { y$stripped_text <- gsub(\'http\\\\S+\\\\s*\',"", y$text)