Last active
May 1, 2019 11:23
-
-
Save emitanaka/1c58351da6fc67712fc8a1a61795536a to your computer and use it in GitHub Desktop.
Hadley in Sydney Public Lecture
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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