mindiff | R Documentation |
Find the minimum difference between a vector and a set of choices.
mindiff(x, choices, tie = c("first", "last", "median-first", "median-last"))
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.) |
The vector of x
replaced by the closest values from the
choices
vector.
mindiff_after
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.