Skip to contents

Returns a logical vector of elements of x not matching the regex y.

Usage

x %nlike% 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 aren't like y.

See also

%like%, %nlike%, %nin%,

Examples

(Name <- c("Mary","George","Martha"))
#> [1] "Mary"   "George" "Martha"
Name %in% c("Mary")
#> [1]  TRUE FALSE FALSE
Name %like% "^Mar"
#> [1]  TRUE FALSE  TRUE
Name %nin% c("George")
#> [1]  TRUE FALSE  TRUE
Name %nlike% "^Mar"
#> [1] FALSE  TRUE FALSE