dot-zero_range: Check whether all elements of a numeric vector are identical...

.zero_rangeR Documentation

Check whether all elements of a numeric vector are identical (within machine precision)

Description

Check whether all elements of a numeric vector are identical (within machine precision)

Usage

.zero_range(x, tol = .Machine$double.eps^0.5)

Arguments

x

a numeric vector.

Value

TRUE if all elements of the vector are identical (within machine precision). FALSE in all other cases, including if the vector contains any NAs.

Note

This function is based on Hadley and John's answer to http://stackoverflow.com/q/4752275. No check is made that x is a numeric vector.


PeteHaitch/GenomicTuples documentation built on Nov. 9, 2023, 5:02 a.m.