Learn R Programming

statnet.common (version 4.10.0)

all_identical: 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)

Value

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

Arguments

x

a vector or a list

See Also

Examples

Run this code

stopifnot(!all_identical(1:3))

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

Run the code above in your browser using DataLab