zcn: Partial Value Matching

%cn%R Documentation

Partial Value Matching

Description

Matches partial values, such as substrings.

Usage

x %cn% pattern

Arguments

x

the character vector to be matched. Missing values are permitted.

pattern

the pattern to be matched against, may be a regular expression.

Value

A vector the same length as x of logical values indicating whether pattern is found in the element of x or not.

See Also

%in%, regexpr

Examples


## A simple example
c("abc", "def") %cn% "c"

USGS-R/smwrBase documentation built on Oct. 18, 2022, 9:55 a.m.