which.closest: Where is the closest?

Description Usage Arguments Author(s) See Also Examples

View source: R/which.closest.R

Description

Returns index of the closest value to x.

Usage

1
which.closest(vec, x)

Arguments

vec

a numeric vector.

x

numeric. The value for which the closest match should be returned.

Author(s)

Matthew A. Birk, matthewabirk@gmail.com

See Also

which.min, which.max

Examples

1
which.closest(10:1, 3.3)

birk documentation built on May 2, 2019, 8:58 a.m.

Related to which.closest in birk...