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/statnet.common documentation built on Feb. 20, 2024, 11:02 p.m.