Do you have some data that you need to replace? In data analysis, you may need to work with missing values, negative values, or non-accurate values that are present in the dataset.
Have a look at this webpage at Digital Ocean called How To Replace Values Using `replace()` and `is.na()` in R.