<-function(var1,var2){
f1::summarise(mtcars,mean=mean({{var1}}+{{var2}}))
dplyr
}f1(mpg,cyl)
<-function(var1,var2){
f2::summarise(mtcars,mean=mean(!!sym(var1)+!!sym(var2)))
dplyr
}f2('mpg','cyl')
<- "name"
x
list2("{{ x }}" := 1)
$`"name"`
[1] 1
#> $`"name"`
#> [1] 1
list2("{x}" := 1)
$name
[1] 1