R/utils.R

## I copied this from https://github.com/hadley/tidyr/blob/master/R/utils.R
col_name <- function(x, default = stop("Please supply column name", call. = FALSE)) {
  if (is.character(x)) return(x)
  if (identical(x, quote(expr = ))) return(default)
  if (is.name(x)) return(as.character(x))
  if (is.null(x)) return(x)

  stop("Invalid column specification", call. = FALSE)
}

n_dots <- function(...) nargs()
alexwhan/genomap documentation built on May 10, 2019, 8:58 a.m.