normalize: normalize

View source: R/normalize.R

normalizeR Documentation

normalize

Description

Extracts the numeric vectors from a data frame and normalizes each vector. Note: In case that a variable is constant for method==1 (minmax) the entries will be replaced by 0.5 and for method==2 (standardization) the entries will be replaced by 0.

Usage

normalize(x, method = 1)

Arguments

x

data.frame or matrix

method

integer: normalization method (default: 1)

  • 0: no rescaling

  • 1: (x-min(x))/(max(x)-min(x))

  • 2: (x-mean(x))/sd(x)

Value

numeric matrix

See Also

In package normalize or at CRAN

Examples

normalize(iris, 2)

sigbertklinke/smvgraph documentation built on Dec. 10, 2022, 9:13 a.m.