Skip to contents

Wrapper of unique(diff(x)) with tolerance check

Usage

uniqdif(x, tol = 1e-08)

Arguments

x

A numeric vector.

tol

A numeric tolerance for detecting non-uniform spacing. Default is 1e-8.

Value

A numeric value if uniform, or a vector of unique differences otherwise.