Tidy Evaluation not working with mutate and stringr
问题 I've trying to use Tidy Eval and Stringr togheter inside a mutate pipe, but every time I run it it gives me an undesirable result. Instead of changing the letter 'a' for the letter 'X', it overwrite the entire vector with the column name, as you can see in the example below, that uses the IRIS dataset. text_col="Species" iris %>% mutate({{text_col}} := str_replace_all({{text_col}}, pattern = "a", replacement = "X")) result: structure(list(Sepal.Length = c(5.1, 4.9, 4.7, 4.6, 5, 5.4, 4.6, 5, 4