Learn R Programming

emoa (version 0.5-3)

inbounds: Clip value to a given range

Description

Clip \(x\) to the interval \([l, u]\). This is useful to enforce box constraints.

Usage

inbounds(x, l, u)

Value

l if x < l, u if x > u else x.

Arguments

x

Value to clip.

l

Lower limit.

u

Upper limit.

Author

Olaf Mersmann olafm@statistik.tu-dortmund.de