all_the_same: Are all elements of a vector the same?

View source: R/is_are.R

all_the_sameR Documentation

Are all elements of a vector the same?

Description

Tests whether all elements of a simple vector are the same.

Usage

all_the_same(x)

Arguments

x

(num vector) A numericor or character vector.

Examples

all_the_same(rep(1, 100))
all_the_same(rnorm(100))
all_the_same(letters[rep(1, 10)])
all_the_same(letters[sample(1:10, size = 10)])

Deleetdk/kirkegaard documentation built on April 22, 2024, 5:22 p.m.