```
## Not run:
# # little simulation function
# sim <-
# function(mu,f){
# D<-matrix(rnorm(60*f),60,f)
# D[1:20,1:50]<-D[1:20,1:50]+mu
# D[21:40,1:50]<-D[21:40,1:50]-mu
# return(D)
# }
#
# set.seed(1)
# d<-sim(1.5,100); # non contaminated dataset with noise variables
#
# # Clest with robust sparse K-means
# rsk<-Clest(d,5,alpha=1/20,B=3,B0=10, beta = 0.05, nstart=100,pca=TRUE,L1=3,silent=TRUE);
# # Clest with K-means
# k<-Clest(d,5,alpha=0,B=3,B0=10, beta = 0.05, nstart=100,pca=TRUE,L1=NULL,silent=TRUE);
# ## End(Not run)
```

Run the code above in your browser using DataCamp Workspace