normalization: Normalize numeric vector

View source: R/computation.R

normalizationR Documentation

Normalize numeric vector

Description

Normalize numeric vector

Usage

normalization(x, method = "max_min", na_rm = TRUE, ...)

Arguments

x

Input numeric vector.

method

Method used for normalization.

na_rm

Whether to remove NA values, and if setting TRUE, using 0 instead.

...

Parameters for other methods.

Value

Normalized numeric vector

Examples

x <- c(runif(2), NA, -runif(2))
x
normalization(x, method = "max_min")
normalization(x, method = "maximum")
normalization(x, method = "sum")
normalization(x, method = "softmax")
normalization(x, method = "z_score")
normalization(x, method = "mad")
normalization(x, method = "unit_vector")
normalization(x, method = "unit_vector", na_rm = FALSE)

thisutils documentation built on July 3, 2025, 9:09 a.m.