bound: bound

View source: R/bound.R

boundR Documentation

bound

Description

Bound the variable by lower and upper limits

Usage

bound(x, lower, upper)

Arguments

x

Choose variable from which to calculate.

lower

Lower bound to cut the values to.

upper

Upper bound to limit the values to.

Examples

bound(-10, 0, 10)
bound(c(-10, 0, 3, 10, 100, "r"), 0, 10)
sapply(c(-10, 0, 100, NULL, NA), bound, 0, 10)

JouniVatanen/stools documentation built on Jan. 25, 2023, 8:49 p.m.