match.closest: Return the closest value within a vector to a given input

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

Return the closest value within a vector to a given input

Usage

1

Arguments

x

the input to be matched

v

the vector of reference numbers

Value

a number

Examples

1
2
v = c(1, 2, 4, 6)
match.closest(3.53424, v)

abnormally-distributed/cvreg documentation built on May 3, 2020, 3:45 p.m.