clamp {MAPCtools}R Documentation

Clamp a numeric value within bounds

Description

Internal helper to restrict values between a lower and upper bound.

Usage

clamp(x, lower, upper)

Arguments

x

A numeric vector.

lower

Lower bound.

upper

Upper bound.

Value

A numeric vector with values clamped.


[Package MAPCtools version 0.1.0 Index]