lim: Crop values of vector or array to a custom range

Description Usage Arguments Value Author(s)

View source: R/lim.R

Description

limits the values of a vector or array to a desired interval, while keeping the shape of the vector/array

Usage

1
lim(x, min = 0, max = 1, clip = NULL, na = NULL)

Arguments

x

vector or array

min

minimum value

max

maximum value

clip

optional value specifying the value assigned to clipped data, e.g. clip=NA

na

optional value specifying the value assigned to non-numbers (NA and NaN)

Value

vector/array of the same shape as x

Author(s)

Danail Obreschkow


docore documentation built on Feb. 1, 2022, 5:06 p.m.

Related to lim in docore...