normalize: Normalize a vector based on specified minimum and maximum...

View source: R/normalize.R

normalizeR Documentation

Normalize a vector based on specified minimum and maximum values

Description

This function normalizes a vector based on specified minimum and maximum values. If the minimum and maximum values are not specified, the function will use the minimum and maximum values of the vector (ignoring missing values).

Usage

normalize(x, min = NULL, max = NULL)

Arguments

x

numeric vector

min

minimum value

max

maximum value

Value

A numeric vector of the same length as x

Author(s)

E. F. Haghish

Examples

## Not run: 
# the function is not exported
normalize(c(0, 5, 10))
normalize(c(1, 1, 1))
normalize(c(NA, 2, 3))

## End(Not run)

shapley documentation built on March 4, 2026, 9:06 a.m.