Skip to content
Prev 360172 / 398503 Next

Equivalent in R of the Contains operator in SAS

Concretely:

merge3[, grepl( "Email|Email\\.x", names(merge3) ) ]  # since "." is special in grepisch patterns.

Which admittedly is a bit redundant since any character value that included `Email.x" would already have been picked up by the "Email" alternative.
David Winsemius
Alameda, CA, USA