Apologies if this is an obvious one.
I have a numeric vector
nv <- round(rnorm(100, 100, 10), 0)
And then I have a separate set of bins
bins <- seq(90, 110, 5)
I want to recode the nv vector into the most proximate bin value (in the real data, the bins are not so neatly organized.)
Thanks