powered by
as_function
as_function(.f)
If a function, it is used as is.
If a formula, e.g. ~ .x + 2, it is converted to a function with two arguments, .x or . and .y
~ .x + 2
.x
.
.y
as_function(~ . + 1) as_function(1) as_function(c("a", "b", "c"))
Run the code above in your browser using DataLab