check-scalar-areSameLength: Do the inputs have the same length?

check-scalar-areSameLengthR Documentation

Do the inputs have the same length?

Description

Do the inputs have the same length?

Usage

areSameLength(x, y)

Arguments

x

Object.

y

Object.

Value

TRUE on success; FALSE on failure, with cause set.

Note

Non-zero lengths for x and y are required, otherwise the check function will intentionally error.

Updated 2023-09-29.

Examples

## TRUE ====
x <- list(a = 1L, b = 2L)
y <- list(c = 3L, d = 4L)
areSameLength(x = x, y = y)

## FALSE ====
x <- list(a = 1L)
y <- list(b = 2L, c = 3L)
areSameLength(x = x, y = y)

steinbaugh/goalie documentation built on Jan. 17, 2024, 5:16 p.m.