Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Hadley in Sydney Public Lecture
# the power of piping + functional programming + stringr + some gluing <3
library(tidyverse)
tidyverse <- "Hadley"
"You're" -> Hadley
"super" -> Thanks
"{tidyverse} is awesome" %>%
str_glue() %>%
print() %>%
str_replace("is awesome", "Thanks ") %>%
word(2:1) %>%
str_flatten(" ") %>%
print() %>%
word(2:1) %>%
map(~paste0("{", .x, "}")) %>%
str_flatten(" ") %>%
str_glue()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.