Returns index of values.

ds_rindex(data, values)

Arguments

data

a numeric vector

values

a numeric vector containing the values whose index is returned

Value

Index of the values in data. In case, data does not contain index, NULL is returned.

Details

Any NA values are stripped from data and values before computation takes place.

Deprecated Function

rindex() has been deprecated. Instead use ds_rindex().

Examples

ds_rindex(mtcars$mpg, 21)
#> [1] 1 2
ds_rindex(mtcars$mpg, 22)
#> NULL