Replace words in a data frame

Hello.
Thanks for providing code , however you havent provided example data, so I recommend you take further steps to make it more convenient for other forum users to help you.

  1. format text to appear as code in the forum, this looks much better and stops posts getting cumbersome with length. This is done simply by turning on and off formatting with triple backtick lines like this
```
my code goes here
```
  1. share data as code, use tools such as the library datapasta, or the base function dput() to share a portion of data in code form, i.e. that can be copied from forum and pasted to R session.

for more details on these tips see reprex guide