R/utils-tidyselect.R

Defines functions tidyselect_syms tidyselect_names tidyselect_locs

# _locs: Get column locations (as an integer vector)
# _names: Get column names (as a character vector)
# _syms: Get column names (as a list of symbols)

tidyselect_locs <- function(.df, ...) {
  eval_select(expr(c(...)), .df)
}

tidyselect_names <- function(.df, ...) {
  names(tidyselect_locs(.df, ...))
}

tidyselect_syms <- function(.df, ...) {
  syms(tidyselect_names(.df, ...))
}

Try the tidytable package in your browser

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

tidytable documentation built on May 29, 2024, 1:18 a.m.