.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

Description

For all elements of a vector a, find the closest elements in a vector B and returns resulting indexes

Usage

.bfast_cpp_closestfrom(a, b, twosided)

Arguments

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.

Value

integer vector of the same size as a with elements represnting indexes pointing to closest values in b


[Package bfast version 1.6.1 Index]