Skip to content

Instantly share code, notes, and snippets.

@ColinFay
Created December 21, 2017 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ColinFay/004458341fa95d88c8557907cd64ed31 to your computer and use it in GitHub Desktop.
Save ColinFay/004458341fa95d88c8557907cd64ed31 to your computer and use it in GitHub Desktop.
library(tidyverse)
library(rlang)
library(glue)
library(stringr)
small_iris <- slice(iris, 1)
set_names(small_iris, ~ glue("{.x}_small"))
set_names(small_iris, ~ tolower(.x))
set_names(small_iris, ~ str_replace_all(.x, "\\.", "_"))
set_names(small_iris, ~ str_replace_all(.x, "\\.", "_") %>% tolower())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment