find_interval: A wrapper around base::findInterval() that allows decreasing...

Description Usage Arguments Value

Description

When vec is in ascending order we use base::findInterval(), but when vec is in descending order we implement an adaptation of the locate() function from Numerical Recipes for C http://apps.nrbook.com/c/index.html

Usage

1
find_interval(x, vec, rightmost.closed = FALSE, all.inside = FALSE)

Arguments

x

numeric values we wish to located within vec

vec

numeric vector of sorted values (ascending or descending order) within which we wish to find the placement of x

rightmost.closed

see findInterval

all.inside

see findInterval

Value

see findInterval


BigelowLab/spnc documentation built on May 5, 2019, 2:45 p.m.