adj_clamp {picohdr}R Documentation

Clamp values outside the specified range

Description

Clamp values outside the specified range

Usage

adj_clamp(arr, lo = -Inf, hi = Inf)

Arguments

arr

array or matrix

lo

low value. Values lower than this will be replaced with this value. Default: -Inf

hi

Values higher than this will be replaced with this value. Default: Inf

Value

adjusted array

See Also

Other array adjustment functions: adj_gamma(), adj_infinite(), adj_rescale(), adj_shift_negatives_global(), adj_shift_negatives_local()

Examples

arr <- array(1:12, c(4, 3, 1))
arr
adj_clamp(arr, 10, 20)

[Package picohdr version 0.1.1 Index]