toto <- runif(10) # 10 random numbers between 0 and 1
tutu <- scale1(toto) # toto centered and normalized
toto0 <- rep(1,10) # 10 numbers all equal to 1
tutu0 <- scale1(toto0) # scaled to 0 # Compare with
tutuNA <- scale(toto0) # all numbers set to NA
Run the code above in your browser using DataLab