\begin{Schunk}
\begin{Sinput}
 ##' Remove spaces, minus signs, and change letters to lower case
 ##'
 ##' Cleans up a character string. Does not do comprenensive
 ##' cleanup, just minus, spaces and capitals. Could extend to other flaws
 ##' @param x A vector of character string.
 ##' @return cleaned vector of strings
 ##' @author pauljohn@@ku.edu
 cleanVarName <- function(x){
      x <- gsub(" ", "_", x, fixed = TRUE)
      x <- gsub("-", "_", x, fixed = TRUE)
      x <- gsub("(_)\\1+", "_", x)
      x <- tolower(x)
      x
  }
\end{Sinput}
\end{Schunk}
