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 ad
As the error says "Error: LHS must be a name or string" where LHS means left-hand side and it's specifically referring to the !!col := 1 part. You need to turn the quosure you made into a string or symbol. It's probably easiest to get the string version of the quosure with quo_name
colTo1 <- function(dt, ...) {
col <- quo_name(quo(...))
mutate(mtcars, !!col := 1)
}