fclamp | R Documentation |
This function clamps (limits) the values of a numeric vector to lie within a specified range [a, b]. Values below a are set to a and values above b are set to b. Optionally, the operation can be performed in-place.
fclamp(x, a = 0, b = 1, inplace = FALSE)
x |
A numeric vector to be clamped. |
a |
The lower bound (default is 0.0). |
b |
The upper bound (default is 1.0). |
inplace |
Logical flag indicating whether to modify the input vector in place (default is false). |
A numeric vector with values clamped to the range [a, b].
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.