loading...

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

...

Arguments to be processed by formula-masking.

.fast.allowed.funs

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().

.max.args

The maximum allowed arguments in ....

.must.be.named

If TRUE, all arguments must be named.

.make.names

If TRUE, unnamed arguments are named automatically.

.no.se

If TRUE, standard evaluation is not allowed.

.no.se.msg

The message to be used if standard evaluation is not allowed.

.envir

The environment where to expand formulas (possibly superseded by the environment attached to the first formula).

.frame

The frame where the focus in the calling stack should be set in error messages (not used yet).

Value

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

See also

Examples

# TODO...