Skip to content
Prev 385347 / 398506 Next

& and |

There are & and | operators in the R language.
There is an | operator in regular expressions.
There is NOT any & operator in regular expressions.
grep("ConfoMap&GuineaPigs", mydata, value=TRUE)
looks for elements of mydata containing the literal
string 'ConfoMap&GuineaPigs'.
[1] "cab"  "back"

grepl returns a TRUE/FALSE vector.
On Thu, 20 Aug 2020 at 02:53, Ivan Calandra <calandra at rgzm.de> wrote: