AllEqual: Check if all values in a vector are the same

Description Usage Arguments Value Author(s) Examples

Description

This function is used to check if all values in a vector are equal. It can be used for example to check if a time series contains only 0 or NA values.

Usage

1

Arguments

x

numeric, character vector, or time series of type ts

Value

The function returns TRUE if all values are equal and FALSE if it contains different values.

Author(s)

Matthias Forkel <matthias.forkel@tu-dresden.de> [aut, cre]

Examples

1
2
3
4
5
# check if all values are equal in the following vectors:
AllEqual(1:10)
AllEqual(rep(0, 10))
AllEqual(letters)
AllEqual(rep(NA, 10))

greenbrown documentation built on Dec. 18, 2020, 3:02 p.m.