all_identical: Test if all items in a vector or a list are identical.

View source: R/misc.utilities.R

all_identicalR Documentation

Test if all items in a vector or a list are identical.

Description

Test if all items in a vector or a list are identical.

Usage

all_identical(x)

Arguments

x

a vector or a list

Value

TRUE if all elements of x are identical to each other.

See Also

identical

Examples


stopifnot(!all_identical(1:3))

stopifnot(all_identical(list("a", "a", "a")))

statnet.common documentation built on May 31, 2023, 6:31 p.m.