[R] Efficient way to substract all entries in two vectors from each other

Johannes Graumann johannes_graumann at web.de
Mon Jan 7 20:18:38 CET 2008


Hi all,

I'm to inexperienced to come up with the matrix solution elusively appearing
on the horizon for the following problem and would appreciate if you could
give me a nudge ...
I have two vectors a, and b and need to find the closest match for each
value of a in b.
How to do that efficiently?

Thanks, Joh




More information about the R-help mailing list