R/unsnake.R

Defines functions unsnake

Documented in unsnake

#' unsnake
#'
#' Quickly convert a snake case value to a title case value. Useful for plotting charts and for presentation tables
#' @param element The element you want to unsnake - it could be a vector, an individual value or a column(s)
#' @export

unsnake <- function(element) {

  x <- str_to_title(gsub('_',' ',element,fixed=TRUE))

  return(x)
}
neugelb/neugelbtools documentation built on July 7, 2020, 1:17 a.m.