powered by
This function takes a numeric vector, sorts it, and then finds the shortest interval and returns its length.
findShortestInterval(x)
The numeric vector.
The length of the shortest interval.
# NOT RUN { findShortestInterval(c(1, 2, 4, 7, 20, 10, 15)); # }
Run the code above in your browser using DataLab