Learn R Programming

smvgraph (version 0.1.2)

normalize: normalize

Description

Extracts the numeric vectors from a data frame and normalizes each vector.

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

Run this code
# NOT RUN {
normalize(iris, 2)
# }

Run the code above in your browser using DataLab