Learn R Programming

purrr (version 0.1.0)

contains: Does a list contain an object?

Description

Does a list contain an object?

Usage

contains(.x, .y)

Arguments

.x
A list or vector.
.y
Object to test for

Examples

Run this code
x <- list(1:10, 5, 9.9)
x %>% contains(1:10)
x %>% contains(3)

Run the code above in your browser using DataLab