R/match-vars.R

match_vars <- function(vars, data) {
  if (is.numeric(vars)) return(vars)
  match(vars, names(data))
}

Try the dplyr package in your browser

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

dplyr documentation built on July 4, 2019, 5:08 p.m.