isSameLength: Check if objects are of same length

View source: R/error-checks.R

isSameLengthR Documentation

Check if objects are of same length

Description

Check if objects are of same length

Usage

isSameLength(...)

Arguments

...

Objects to compare.

Examples

# compare length of only 2 objects
isSameLength(mtcars, ToothGrowth) # FALSE
isSameLength(cars, BOD) # TRUE

# or more number of objects
isSameLength(c(1, 2), c(TRUE, FALSE), c("x", "y")) # TRUE
isSameLength(list(1, 2), list(TRUE, FALSE), list("x")) # FALSE

ospsuite.utils documentation built on March 18, 2022, 6:44 p.m.