Skip to content
Prev 385339 / 398506 Next

& and |

A version of Eric's answer is to use grepl(), which returns a logical vector:

mydata[grepl("ConfoMap", mydata) & grepl("GuineaPigs", mydata)]

with the OR analogue:

mydata[grepl("ConfoMap", mydata) | grepl("GuineaPigs", mydata)]

/Henrik
On Wed, Aug 19, 2020 at 8:24 AM Ivan Calandra <calandra at rgzm.de> wrote: