first_closest: Get first AND closest matching value

Description Usage Arguments Value See Also

View source: R/internal_fns.R

Description

first_closest - takes a single value and finds the index of first time that value is exceeded in a vector, then if that value or the one preceding it is actually closer.

Usage

1
first_closest(this, there)

Arguments

this

numeric. Vector or value. The value(s) to match.

there

numeric. The vector in which to find first closest matching value(s).

Value

Index of where first_closest matching value(s) occur in the target vector.

See Also

first_closest


nicholascarey/attackR documentation built on July 22, 2020, 11:41 p.m.