check_order: Check Order of Values

View source: R/check_helpers.R

check_orderR Documentation

Check Order of Values

Description

This function checks the order of maximum of three numeric vectors: lower, usual, and upper. It returns the indices where the order is incorrect (i.e., lower > upper, lower > usual, or usual > upper). It is used internally in the package to validate the order of values in ATC and package parameters.

Usage

check_order(lower, usual = NULL, upper)

Arguments

lower

a numeric vector representing the lower limit.

usual

a numeric vector representing the usual value (optional).

upper

a numeric vector representing the upper limit.

Value

a vector of indices where the order of values is incorrect (i.e., lower > upper, lower > usual, or usual > upper).


piavat/PRE2DUP-R documentation built on June 11, 2025, 11:42 a.m.