bound {FastUtils}R Documentation

Bound a Number within a Range

Description

This function bounds a number within a specified range.

Usage

bound(num, lowerbound, upperbound)

Arguments

num

A numeric vector to be bounded.

lowerbound

The lower bound of the range.

upperbound

The upper bound of the range.

Value

A numeric vector with elements bounded within the specified range.

Examples

bound(1, 0, 2)
bound(1:10, -1, 5)


[Package FastUtils version 0.1.1 Index]