I have an issue similar to this thread:
Search across multiple columns with a regular expression and extract the match
Let's take an iris dataset as an example. I would like to filter data based on values in several columns: let's say >=4 in cols which names end with ".Length". IRL data are much more complex than this reprex, which is why I want to use regular expression in cols rather than pick them one by one by their indices.
Tried multiple ways, including the following:
filtered <- iris %>% dplyr::filter(across(matches('.Length')>=4))
to no avail. Please help.