I am programming in R to work on Csv and data manipulation I am trying to insert nulls if there is a match to a string in my csv.
My CSV is as follows:
first_name last _name zip_code
Ben Smith 12345
Blank Johnson 23456
Carrie No 34567
The list of bad_names that I would like to look through my csv is bad_names <- c("blank", "no","bad", "old")
Once I loop through my csv looking for the bad_name string matches, I want the output to be
first_name last _name zip_code
Ben Smith 12345
Johnson 23456
Carrie 34567
So it doesn't delete the entire row, but just that matched. I am struggling with deleting just the entry, not the entire row, and looping through the entire list of bad_names.
Thank you for any help you can offer!