has_element: Does a list contain an object?

View source: R/detect.R

has_elementR Documentation

Does a list contain an object?

Description

Does a list contain an object?

Usage

has_element(.x, .y)

Arguments

.x

A list or atomic vector.

.y

Object to test for

Examples

x <- list(1:10, 5, 9.9)
x |> has_element(1:10)
x |> has_element(3)

purrr documentation built on Aug. 10, 2023, 9:08 a.m.