R/camelCase.R

Defines functions toCamel camelCase

camelCase <- function(x) {
  gsub("_(.)", "\\U\\1", x, perl = TRUE)
}

toCamel <- function(x) {
  if (is.list(x)) {
    x[] <- lapply(x, toCamel)
  }

  if (!is.null(names(x))) {
    names(x) <- camelCase(names(x))
  }

  x
}

Try the bigrquery package in your browser

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

bigrquery documentation built on May 29, 2024, 4:08 a.m.