Learn R Programming

sdbuildR (version 2.0.0)

contains_IM: Check whether value is in vector or string

Description

Equivalent of .Contains() in Insight Maker.

Usage

contains_IM(haystack, needle)

Value

Logical value

Arguments

haystack

Vector or string to search through

needle

Value to search for

Examples

Run this code
contains_IM(c("a", "b", "c"), "d") # FALSE
contains_IM(c("abcdef"), "bc") # TRUE

Run the code above in your browser using DataLab