I'm trying to remove rows in a dataframe that do not contain . or _
Basically, keep rows that have . or _
I've tried this with no luck: test = filter(test, grepl("_|.",V1)) where V1 is the name of the column
test = filter(test, grepl("_|.",V1))
For example, from "test", "test.com", "test_com", I'd like to keep "test.com" and "test_com" only.