Skip to contents

Find the previous element of the vector before a value

Usage

find_previous_vector_element(value, vector, LTE = FALSE)

Arguments

value

A value of numeric values

vector

A vector of numeric values

LTE

a boolean to determine collection on "less than" or "less than equal"

Value

The previous element of the vector before the value

Examples

if (FALSE) { # \dontrun{
find_previous_vector_element(value = 5, vector = 1:10)
find_previous_vector_element(value = 5, vector = 6:10)
find_previous_vector_element(value = 5, vector = 5:10, LTE = F)
find_previous_vector_element(value = 5, vector = 5:10, LTE = T)
} # }