Skip to content

Instantly share code, notes, and snippets.

@mine-cetinkaya-rundel
Last active August 13, 2020 21:30
Show Gist options
  • Save mine-cetinkaya-rundel/0aa32ee7d59b078bba08e1ecb449e6df to your computer and use it in GitHub Desktop.
Save mine-cetinkaya-rundel/0aa32ee7d59b078bba08e1ecb449e6df to your computer and use it in GitHub Desktop.
library(tidyverse)
library(rtweet)
library(glue)
tml <- get_timelines("JeffisTallguy", n = 200)
yesterday <- tml %>%
filter(is.na(reply_to_screen_name)) %>%
slice(
which(str_detect(text, "Yesterday by the Beatles is a pretty solid song")):
max(which(str_detect(text, "Yesterday is short for Ye sternum day")))
) %>%
mutate(first_word = word(text, 1))
glue_collapse(yesterday$first_word, sep = " ")
# Yesterday All My Troubles Seemed So Far Away Now It Looks As Though They’re Here To Stay Oh I BELIEVE In Yesterday Suddenly I’m Not Half The Man I Used To BE There’s A Shadow Hanging Over Me, Oh Yesterday Came Suddenly Why She Had To Go I Don’t Know She Wouldn’t Say I Said Something Wrong! Now I Long For Yesterday Yesterday Love Was “Such An Easy Game To Play Now I Need A “Place To HIDE “Away Oh I BELIEVE In Yesterday Why? “She Had To Go I Don’t Know She Wouldn’t Say I “Said Something Wrong Now I Long For Yesterday Yesterday Love Was “Such An Easy Game To Play Now I Need A Place To Hide Away Oh I Believe In Yesterday
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment