This function takes a numeric vector, sorts it, and then finds the shortest interval and returns its length.

findShortestInterval(x)

Arguments

x

The numeric vector.

Value

The length of the shortest interval.

Author

Gjalt-Jorn Peters

Maintainer: Gjalt-Jorn Peters gjalt-jorn@userfriendlyscience.com

Examples


findShortestInterval(c(1, 2, 4, 7, 20, 10, 15));
#> [1] 1