I have a data.frame
with 1 column, and a nondescript number of rows.
This column contains strings, and some strings contain a substring, let's say "abcd"
.
I want to remove any strings from the database that contain that substring. For example, I may have five strings that are "123 abcd"
, and I want those to be removed.
I am currently using grepl()
to try and remove these values, but it is not working. I am trying:
data.frame[!grepl("abcd", dataframe)]
but it returns an empty data frame.