evenly.spaced: Determine Whether a Vector is Evenly Spaced and Increasing

View source: R/utilseq.R

evenly.spacedR Documentation

Determine Whether a Vector is Evenly Spaced and Increasing

Description

Determines whether the entries in a numeric vector are evenly spaced and increasing.

Usage

evenly.spaced(x, tol = 1e-07)

Arguments

x

Numeric vector.

tol

Relative tolerance.

Details

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.

Value

A single logical value.

Author(s)

\adrian

.

Examples

  evenly.spaced(seq(0, 1, length=4))

spatstat.utils documentation built on April 12, 2025, 2 a.m.