Let's say that I have a character vector for random names. I also have another character vector with several cars, and I want to delete any incident of a car incident in the original vector.
So the vectors are given:
dat = c("Tonyhonda","DaveFord","Alextoyota") car = c("Honda","Ford","Toyota","honda","ford","toyota")
I want to get something like below:
dat = c("Tony","Dave","Alex")
How to remove part of a string in R?
r
ATMA
source share