logical3: Vectorized logical with support for short-circuits

logical3R Documentation

Vectorized logical with support for short-circuits

Description

Vectorized logical with support for short-circuits

Usage

and3(x, y, z = NULL, nas_absent = FALSE)

or3(x, y, z = NULL)

Arguments

x, y, z

Logical vectors. If z is NULL the function is equivalent to the binary versions; only x and y are used.

nas_absent

(logical, default: FALSE) Can it be assumed that x,y,z have no missing values? Set to TRUE when you are sure that that is the case; setting to TRUE falsely has no defined behaviour.

Value

For and3, the same as x & y & z; for or3, the same as x | y | z, designed to be efficient when component-wise short-circuiting is available.


hutilscpp documentation built on Oct. 11, 2023, 9:06 a.m.