powered by
Extracts the numeric vectors from a data frame and normalizes each vector.
normalize(x, method = 1)
data.frame or matrix
integer: normalization method (default: 1)
1
0: no rescaling
1: \((x-min(x))/(max(x)-min(x))\)
2: \((x-mean(x))/sd(x)\)
numeric matrix
In package normalize or at CRAN
normalize
# NOT RUN { normalize(iris, 2) # }
Run the code above in your browser using DataLab