allSame: Are all values the same?

allSameR Documentation

Are all values the same?

Description

Given a vector, are all the values in it the same?

Usage

allSame(x)

Arguments

x

a vector

Value

TRUE, if all the values are the same (or the vector is empty)

Author(s)

Tomas Sieger

Examples

allSame(c(TRUE, TRUE, TRUE))
allSame(c(TRUE, TRUE, FALSE))
allSame(c(FALSE, FALSE))
allSame(NULL)

tsieger/tsiMisc documentation built on Oct. 10, 2023, 10:24 p.m.