contains: Check if a list / object contains a value

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

Check if a list / object contains a value

Usage

1
contains(x, val)

Arguments

x

object or list

val

character value of the name of the object/list element to check

Value

TRUE if the value is present, FALSE if not.

Examples

1
2
x <- list("a"=1, "b"=2)
contains(x, "a")

JasperHG90/blm documentation built on Sept. 4, 2019, 11:16 a.m.