Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

vars_select

Select or rename variables


Description

[Questioning]

Please use eval_select() and eval_rename() instead. See vignette("tidyselect") to get started.

Usage

vars_select(
  .vars,
  ...,
  .include = character(),
  .exclude = character(),
  .strict = TRUE
)

vars_rename(.vars, ..., .strict = TRUE)

Arguments

.vars

A character vector of existing column names.

..., args

Selection inputs. See the help for selection helpers.

.include, .exclude

Character vector of column names to always include/exclude.

.strict

If TRUE, will throw an error if you attempt to select or rename a variable that doesn't exist.

Value

A named character vector. Values are existing column names, names are new names.

See Also


tidyselect

Select from a Set of Strings

v1.1.1
MIT + file LICENSE
Authors
Lionel Henry [aut, cre], Hadley Wickham [aut], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.