drange: Set Dynamic Range

View source: R/utils.R

drangeR Documentation

Set Dynamic Range

Description

⁠rtemis preproc⁠: Adjusts the dynamic range of a vector or matrix input. By default normalizes to 0-1 range.

Usage

drange(x, lo = 0, hi = 1, byCol = TRUE)

Arguments

x

Numeric vector or matrix / data frame: Input

lo

Target range minimum. Defaults to 0

hi

Target range maximum. Defaults to 1

byCol

Logical: If TRUE: if x is matrix, drange each column separately

Value

Numeric vector.

Author(s)

EDG

Examples

## Not run: 
x <- runif(20, -10, 10)
x <- drange(x)

## End(Not run)

egenn/rtemis documentation built on June 14, 2025, 11:54 p.m.