R/tidyName.R

Defines functions tidyName

Documented in tidyName

tidyName <- function(x, fixes = c('_', '.', ' ', '-', '>'), case = c('lower', 'upper', 'nochange')) {
  x = switch(case[1], lower = tolower(x), upper = toupper(x), nochange = x)
  for(i in fixes) x <- (gsub(i, "", x, fixed = T))
  x
  }

Try the RADami package in your browser

Any scripts or data that you put into this service are public.

RADami documentation built on May 30, 2017, 8:23 a.m.