find_interval: Given a vector of interval endpoints 'breaks', determine in...

View source: R/RcppExports.R

find_intervalR Documentation

Given a vector of interval endpoints breaks, determine in which intervals the elements of a vector x fall.

Description

Given a vector of interval endpoints breaks, determine in which intervals the elements of a vector x fall.

Usage

find_interval(x, breaks, rightmost_closed, all_inside)

Arguments

x

vector for whose elements the corresponding intervals are identified

breaks

vector containing the elements

rightmost_closed

logical; if true, the results for x[j]=breaks[N] is N-1.

all_inside

logical; if true, 0 is mapped to 1, and N is mapped to N-1

The rightmost interval is assumed to be closed. Compares to the behavior of the findInterval function in R, when rightmost.closed = TRUE

Value

matrix containing the compartment counts at census times.


fintzij/stemr documentation built on March 25, 2022, 12:25 p.m.