change values in column, data frame

# Assuming the data frame is named "df" and the column to be modified is named "column_name"
# Step 1: Use the ifelse() function to change the values in the specified column
df$column_name <- ifelse(df$column_name == "old_value", "new_value", df$column_name)