normalize_01: Rescale a numeric vector to the unit interval

View source: R/score.R

normalize_01R Documentation

Rescale a numeric vector to the unit interval

Description

Rescale a numeric vector to the unit interval

Usage

normalize_01(x)

Arguments

x

A numeric vector. Missing values are ignored during rescaling and preserved in the result.

Value

A numeric vector of the same length rescaled to [0, 1]. If all non-missing values are equal, a zero vector is returned.

Examples

normalize_01(c(2, 5, 8))
normalize_01(c(1, 1, 1))

drmeta documentation built on Aug. 25, 2026, 1:08 a.m.