rray-logical: Logical operations

rray-logicalR Documentation

Logical operations

Description

  • rray_and() tests whether both x and y are TRUE.

  • rray_or() tests whether at least one of x and y is TRUE.

  • rray_xor() tests whether exactly one of x and y is TRUE.

Usage

rray_and(x, y)

rray_or(x, y)

rray_xor(x, y)

Arguments

x, y

Logical arrays.

Details

The arrays are broadcast to common dimensions before the operation is applied.

Missing values are handled the same way as &, |, and xor().

These functions participate in rray's common name determination rules.

Value

A logical array with the common dimensions of x and y.

Examples

x <- array(c(TRUE, FALSE, TRUE), c(3L, 1L))
y <- array(c(TRUE, FALSE), c(1L, 2L))

rray_and(x, y)
rray_or(x, y)
rray_xor(x, y)

rray_and(NA, FALSE)
rray_or(NA, TRUE)
rray_xor(NA, TRUE)

rray documentation built on Nov. 17, 2026, 5:07 p.m.