R/formula_select.R
formula_select.Rd
The formula-select interface allows to give arguments in the tidy-select style withing formulas, or as standard-evaluated arguments. It thus combines both approaches within the same function, and makes it clearer which are the intention: standard evaluation, or non-standard evaluation when formulas are used.
formula_select(
...,
.fast.allowed.funs = NULL,
.max.args = NULL,
.must.be.named = FALSE,
.make.names = FALSE,
.no.se = FALSE,
.no.se.msg = gettext("Standard evaluation is not allowed."),
.envir = parent.frame(2L),
.frame = parent.frame()
)
Arguments to be processed by formula-masking.
A character vector of function names that are
allowed for a fast treatment (usually though collapse functions). If any
other function is used, the slower tidy-select mechanism is used, see
tidyselect::eval_select()
.
The maximum allowed arguments in ...
.
If TRUE
, all arguments must be named.
If TRUE
, unnamed arguments are named automatically.
If TRUE
, standard evaluation is not allowed.
The message to be used if standard evaluation is not allowed.
The environment where to expand formulas (possibly superseded by the environment attached to the first formula).
The frame where the focus in the calling stack should be set in error messages (not used yet).
A list with components:
dots
: the processed arguments (formulas are turned into expressions)
are_formulas
: whether the arguments were formulas
env
: The environment where the expressions should be evaluated.
fastselect
: whether fast selection can be used
formula_masking()
,
https://tidyselect.r-lib.org/articles/syntax.html or
vignette("syntax", package = "tidyselect")
for a technical
description of the rules of evaluation.
# TODO...