powered by
Transform a vector to z scores by subtracting its mean and dividing by its standard deviation
standardize(X)
vector of the same length in standardised form
numeric vector to standardize
Nicholas Cooper njcooper@gmx.co.uk
x1 <- rnorm(10,100,15); x2 <- sample(10) print(x1) ; standardize(x1) print(x2) ; standardize(x2)
Run the code above in your browser using DataLab