R/col_name.R

# from tidyr
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)
}

Try the lplyr package in your browser

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

lplyr documentation built on May 2, 2019, 11:58 a.m.