which.closest: which.closest

View source: R/which.closest.R

which.closestR Documentation

which.closest

Description

finds the closes match in a given vector of time

Usage

which.closest(Time, x)

Arguments

Time

vector of time in any format abs() accepts

x

object of time in any format abs() accepts

Value

Missing and NaN values are discarded.

an integer or on 64-bit platforms, if length(x) =: n>= 2^31 an integer valued double of length 1 or 0 (iff x has no non-NAs), giving the index of the first minimum or maximum respectively of x.

If this extremum is unique (or empty), the results are the same as (but more efficient than) which(x == min(x, na.rm = TRUE)) or which(x == max(x, na.rm = TRUE)) respectively.

Author(s)

Michael Thrun

See Also

abs


Mthrun/TSAT documentation built on Feb. 5, 2024, 11:15 p.m.