R/make_names.R

Defines functions make_names

Documented in make_names

#' Expanded make.names function for creating consistent column names
#'
#' @param x data frame with columns to be renamed
#'
#' @return a data frame
#' @export
make_names <- function(x) {
  new_names <- make.names(colnames(x))
  new_names <- gsub("\\.", "_", new_names)
  new_names <- tolower(new_names)
  colnames(x) <- new_names
  x
}
jmlondon/wcUtils documentation built on March 19, 2024, 8:40 a.m.