# NOT RUN {
library(anomaly)
# generate some multivariate data
set.seed(0)
X<-simulate(n=1000,p=4,mu=10,locations=c(200,400,600),
duration=100,proportions=c(0.25,0.5,0.75))
# compare the medians of each variate and transformed variate
head(apply(X,2,median))
head(apply(robustscale(X),2,median))
# compare the variances of each variate and transformed variate
head(apply(X,2,var))
head(apply(robustscale(X),2,var))
# }
Run the code above in your browser using DataLab