Learn R Programming

statnet.common (version 4.3.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)

Arguments

x

a vector or a list

Value

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

See Also

identical

Examples

Run this code
# NOT RUN {
stopifnot(!all_identical(1:3))

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

Run the code above in your browser using DataLab