quos_underscore: Convert arguments whose names end with _ into quosures...

View source: R/quos_underscore.R

quos_underscoreR Documentation

Convert arguments whose names end with _ into quosures automatically

Description

The expressions provided for all arguments whose names end with ⁠_⁠ are automatically converted into quosures, and also assigned to a name without the training ⁠_⁠. The other arguments are evaluated in an usual way.

Usage

quos_underscore(...)

Arguments

...

The named arguments provided to be either converted into quosures or evaluated.

Value

An object of class quosures is returned. It can be used directly in tidyeval-aware contexts.

See Also

as.quosure, %>_%

Examples

foo <- function(...)
  quos_underscore(...)
foo(x  = 1:10, # "Normal" argument
    y_ = 1:10, # Transformed into a quosure
    z_ = non_existing_name) # Expressions in quosures are not evaluated

SciViews/flow documentation built on May 4, 2024, 6:22 a.m.