I wrote a find and replace function for my data set, I want to change a particular string in a column from every occurrence of X to Y. I wrote this function although it does not change the dataset it creates a group of values? How can I modify this to change the strings in that column
data <- gsub("X", "Y", data_frame$column)
Edit 1: Also tried this although did not fully understand.