cap: Set all elements of a vector or matrix above a certain value...

View source: R/cap.R

capR Documentation

Set all elements of a vector or matrix above a certain value to that value

Description

Set all elements of a vector or matrix above a certain value to that value

Usage

cap(x, at)

Arguments

x

A numeric vector or matrix.

at

Value at which to cap x.

Value

x but with values greater than at set equal to at

Examples

cap(1:5, at = 2)

jgabry/RHhelpers documentation built on Feb. 22, 2024, 12:56 p.m.