Say for example, I have a character vector
a [1] "hi come asap, the show is awsome" "I am suffering from cold"
d [1] "asap" "awsome" "cold" "lol" "rofl"
I should replace any word(from "d") if found in "a" with empty space. How do I implement in R?
I think I understand but could be wrong. You could try:
Yields:
Perhaps something like the following would work for you:
Or, the opposite way: