Skip to content

Instantly share code, notes, and snippets.

@seasmith
Created April 27, 2020 03:46
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 seasmith/02b6816a819fafa0e4d582e012bacaa7 to your computer and use it in GitHub Desktop.
Save seasmith/02b6816a819fafa0e4d582e012bacaa7 to your computer and use it in GitHub Desktop.
price_type <- c("henry_hub_spot", "future_contract_1",
"future_contract_2", "future_contract_3",
"future_contract_4")
make_proper_names <- function (x) {
stringr::str_replace_all(x, "_", " ") %>%
stringr::str_to_title()
}
make_proper_names(price_type)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment