enquo() inside a magrittr pipeline
问题 I just would like to understand what's going wrong here. In the first case (working), I assign the enquo() -ted argument to a variable, in the second case, I use the enquoted argument directly in my call to mutate . library("dplyr") df <- tibble(x = 1:5, y= 1:5, z = 1:5) # works myfun <- function(df, transformation) { my_transformation <- rlang::enquo(transformation) df %>% gather("key","value", x,y,z) %>% mutate(value = UQ(my_transformation)) } myfun(df,exp(value)) # does not work myfun_2 <-