Learn R Programming

ufs (version 25.7.1)

findShortestInterval: Find the shortest interval

Description

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

Usage

findShortestInterval(x)

Value

The length of the shortest interval.

Arguments

x

The numeric vector.

Author

Gjalt-Jorn Peters

Maintainer: Gjalt-Jorn Peters ufs@opens.science

Examples

Run this code

findShortestInterval(c(1, 2, 4, 7, 20, 10, 15));

Run the code above in your browser using DataLab