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@geo.tuwien.ac.at> [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))

ModelDataComp documentation built on May 31, 2017, 1:35 a.m.

Search within the ModelDataComp package
Search all R packages, documentation and source code