isSome: Checks whether some object evaluates to TRUE for a provided...

View source: R/0helpers.R

isSomeR Documentation

Checks whether some object evaluates to TRUE for a provided criterion function

Description

Checks whether some object evaluates to TRUE for a provided criterion function

Usage

isSome(..., func)

Arguments

...

objects that need testing

func

function used to evaluate the truth

Value

Returns TRUE if there's some object that evaluates to TRUE according to func, and FALSE if all func evaluations lead to FALSE

Examples

x <- 1
y <- "a"
z <- NA

isSome(x, y, z, func=is.numeric)
isSome(x, y, z, func=is.na)
isSome(x, y, z, func=is.vector)
isSome(x, y, func=is.na)

AlexanderLyNL/bstats documentation built on Sept. 11, 2023, 4:10 p.m.