%like% {Tmisc} | R Documentation |
x like y
Description
Returns a logical vector of elements of x matching the regex y.
Usage
x %like% pattern
Arguments
x |
a vector (numeric, character, factor) |
pattern |
a vector (numeric, character, factor), matching the mode of x |
Value
A logical vector with length equal to x
of things in x
that are like y
.
See Also
Examples
(Name <- c("Mary","George","Martha"))
Name %in% c("Mary")
Name %like% "^Mar"
Name %nin% c("George")
Name %nlike% "^Mar"
[Package Tmisc version 1.0.1 Index]