findInOrdered {oce} | R Documentation

## Find indices of tiems in an ordered vector

### Description

Find indices of tiems in an ordered vector

### Usage

    findInOrdered(x, f)

### Arguments

`x` | a numeric vector, in increasing order by value.
`f` | a numeric vector of items whose indices are sought.

### Details

The indices point to the largest items in `x` that are less than or equal the values in `f`. The method uses a bisection search, so the time taken is proportional to `length(f) * log2(length(x))`.

### Value

A numerical vector indicating the indices of left-sided neighbors.

### Author(s)

Dan Kelley

### Examples

    findInOrdered(seq(0,10,1), c(1.2,7.3))

[Package oce version 0.9-18 Index]