powered by
Normalize a numeric vector to have a mean of zero and a standard deviation of one.\
normalize(x)
a numeric vector.
a numeric vector of the same length as x.
x
# NOT RUN { x <- runif(20, 50, 110) x.norm <- normalize(x) mean(x) mean(x.norm) sd(x) sd(x.norm) # }
Run the code above in your browser using DataLab