Find the minimum difference between a vector and a set of choices.
mindiff.Rd
Find the minimum difference between a vector and a set of choices.
Usage
mindiff(x, choices, tie = c("first", "last", "median-first", "median-last"))
Arguments
- x
The vector of values to adjust
- choices
The vector of values which should be matched
- tie
How should a tie (two choices are equidistant) be managed? (See details.)