This function replaces values in a column of a dataframe with a new value.
Examples
data <- data.frame(x = c("a", "b", "c"), y = c("d", "e", "f"))
replace_values(data, "x", "y", "b")
#> x y
#> 1 a d
#> 2 e e
#> 3 c f
This function replaces values in a column of a dataframe with a new value.
data <- data.frame(x = c("a", "b", "c"), y = c("d", "e", "f"))
replace_values(data, "x", "y", "b")
#> x y
#> 1 a d
#> 2 e e
#> 3 c f