How to use tidyeval on a column to mutate?
I'm sorry for the confusion but eventually, the first example I posted (at the bottom of the page), did not help me to figure out how tidyeval works with mutate, so I'm adding a new example. I would like to create a function that takes three args: a dataframe the column(s) to mutate a variable (from the dataframe) to replace the values that are being mutated For instance, to replace the values in mpg with the values from carb I tried this: I tried this colToX <- function(dt, ..., repl) { cols <- quos(...) repl <- quo(repl) mutate_at(dt, vars(!!!cols), funs(function(x) !!repl)) } colToX(mtcars,