Does a list contain an object?

Description

Does a list contain an object?

Usage

1
contains(.x, .y)

Arguments

.x

A list or atomic vector.

.y

Object to test for

Examples

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

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.