rel_pos_of_value_in_vector: Find relative position of a value in a vector

View source: R/rel_pos_of_value_in_vector.R

rel_pos_of_value_in_vectorR Documentation

Find relative position of a value in a vector

Description

Find relative position of a value in a vector that may or may not contain the value

Usage

rel_pos_of_value_in_vector(value = NULL, vector = NULL)

Arguments

value

a value whose relative position is to be searched in a vector

vector

a numeric vector

Value

a number indicating the relative position of the value in the vector

Examples

rel_pos_of_value_in_vector(value = 3, vector = c(2, 4))
rel_pos_of_value_in_vector(value = 3, vector = c(2, 6))
rel_pos_of_value_in_vector(value = 3, vector = 1:3)

kim documentation built on Oct. 9, 2023, 5:08 p.m.