normalise: Normalize a Vector to the 0-1 Range

View source: R/misc_functions.R

normaliseR Documentation

Normalize a Vector to the 0-1 Range

Description

This function normalizes a numeric vector so that its values are scaled to lie within the 0 to 1 range. If all elements in the vector are identical, the function returns 1.

Usage

normalise(x, ...)

Arguments

x

A numeric vector to be normalized.

...

Additional arguments (currently unused).

Value

A numeric vector with values scaled between 0 and 1, or a single value 1 if all elements are identical.


ChristK/CKutils documentation built on April 11, 2025, 10:11 p.m.