Kmeans <-
function(x,k,xout=FALSE,outfun=out){
#
# Do K means cluster analysis, outliers removed
# if xout=T
x=elimna(x)
x=as.matrix(x)
if(xout){
flag<-outfun(x,plotit=FALSE)$keep
x<-x[flag,]
}
x=as.matrix(x)
res=kmeans(x,k)
res
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.