find_less: Find the choice that is less than a value

View source: R/find_less.R

find_lessR Documentation

Find the choice that is less than a value

Description

Find the choice that is less than a value

Usage

find_less(x, choices, include_same = TRUE, none = c("first", "na"))

Arguments

x

The vector of values to select choices for.

choices

The choices that are to be selected from.

include_same

Include if the choice is <= and not strictly <.

none

What if the x value is less than (or less than or equal to if include_same) all the choices? Choose the "first" choice or insert an NA value?

Details

x and choices must be comparable by the < or <= operators. choices will be sorted to be in ascending order; sorting will remove any NA values from choices.

Value

A vector with values from choices that are less than (or equal to) x


billdenney/bsd.report documentation built on Jan. 16, 2024, 12:54 a.m.