powered by
Determines whether the entries in a numeric vector are evenly spaced and increasing.
evenly.spaced(x, tol = 1e-07)
A single logical value.
Numeric vector.
Relative tolerance.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au.
The result is TRUE if x is an increasing sequence in which the successive differences diff(x) are all equal to one another (within the specified relative tolerance), and FALSE otherwise.
TRUE
x
diff(x)
FALSE
evenly.spaced(seq(0, 1, length=4))
Run the code above in your browser using DataLab