has_element {mlr3misc}R Documentation

Check if an Object is Element of a List

Description

Simply checks if a list contains a given object.

Usage

has_element(.x, .y)

Arguments

.x

:: (list() or atomic vector).

.y

:: any
Object to test for.

Examples

has_element(list(1, 2, 3), 1)

[Package mlr3misc version 0.1.3 Index]