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

vars

Select variables


Description

vars() was only needed for the scoped verbs, which have been superseded by the use of across() in an existing verb. See vignette("colwise") for details.

This helper is intended to provide equivalent semantics to select(). It is used for instance in scoped summarising and mutating verbs (mutate_at() and summarise_at()).

Note that verbs accepting a vars() specification also accept a numeric vector of positions or a character vector of column names.

Usage

vars(...)

Arguments

...

<tidy-select> Variables to include/exclude in mutate/summarise. You can use same specifications as in select(). If missing, defaults to all non-grouping variables.

See Also

all_vars() and any_vars() for other quoting functions that you can use with scoped verbs.


dplyr

A Grammar of Data Manipulation

v1.0.6
MIT + file LICENSE
Authors
Hadley Wickham [aut, cre] (<https://orcid.org/0000-0003-4757-117X>), Romain François [aut] (<https://orcid.org/0000-0002-2444-4226>), Lionel Henry [aut], Kirill Müller [aut] (<https://orcid.org/0000-0002-1416-3412>), RStudio [cph, fnd]
Initial release

We don't support your browser anymore

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