clamp: Clamp a vector between some modulus

Description Usage Arguments Value

View source: R/misc.R

Description

Replaces all values greater than modulus with modulus and all values lt modulus with -modulus

Usage

1
clamp(x, modulus = 5)

Arguments

x

numeric vector

modulus

numeric scalar

Value

numeric vector


amcdavid/AMmisc documentation built on Aug. 10, 2018, 8:34 p.m.