nearestN: Nearest Value Index

Description Usage Arguments Value Examples

View source: R/nearestN.R

Description

Function to find the index of the nearest value from within a set of values

Usage

1
nearestN(value, values)

Arguments

value

The value to be matched

values

The set of values with which the value is being compared

Value

Index of the nearest value

Examples

1
2
a <- runif()
nearestN(50, a)

mathesong/granviller documentation built on April 20, 2020, 7:28 p.m.