.bfast_cpp_closestfrom {bfast} | R Documentation |
For all elements of a vector a, find the closest elements in a vector B and returns resulting indexes
.bfast_cpp_closestfrom(a, b, twosided)
a |
numeric vector, ordered |
b |
numeric vector, ordered |
twosided |
logical value, if false, indexes will always point to elements in b that are less than or equal to elements in a but not greater than. |
integer vector of the same size as a with elements represnting indexes pointing to closest values in b