Learn R Programming

PvSTATEM (version 0.2.2)

clamp: Clamp a value to a range

Description

Clamp a value to a range

Usage

clamp(x, lower = -Inf, upper = Inf)

Value

A numeric value clamped to the range [lower, upper].

Arguments

x

(numeric()) A numeric value to be clamped.

lower

('numeric(1)') The lower bound of the range.

upper

(numeric(1)) The upper bound of the range.