I have a df such as
df <-read.table(text="
v1 v2 v3 v4 v5
1 A B X C
2 A B C X
3 A C C C
4 B D V A
5 B Z Z D", header=T)
How can I filter variables v2 to v5 if they have an "X". I've seen some examples using filter at but those seem to work only for numeric conditions.
filter_at(vars(contains("prefix")), all_vars(.>5))
and replacing >5 for "X" does not work