is_in_inclusive: Checks whether a value, or all values in a vector, is within...

View source: R/utils.R

is_in_inclusiveR Documentation

Checks whether a value, or all values in a vector, is within inclusive limits

Description

Checks whether a value, or all values in a vector, is within inclusive limits

Usage

is_in_inclusive(x, lims)

Arguments

x

A numeric value, or vector of values.

lims

A two-element vector of (min, max) values for the inclusive limits. If x is a vector, lims may also be a two-column matrix with nrow=length(x) where the first column is lower limits and the second column is upper limits. If x is a vector and lims is a two-element vector, then each element of x will be checked against the same limits. If x is a vector and lims is a matrix, then each element of x will be checked against the limits given by the corresponding row of lims.

Value

A logical vector the same length as x, indicating whether each element of x is within the inclusive limits given by lims.

Author(s)

Caroline Ring

References

Ring, Caroline L., et al. "Identifying populations sensitive to environmental chemicals by simulating toxicokinetic variability." Environment International 106 (2017): 105-118


httk documentation built on March 7, 2023, 7:26 p.m.