TKmeans.grp <-
function(x,k,y){
#
# Create k groups based on data in x using trimmed k means method
# Then sort the data in y into k groups based on the groups indicated
#
x=elimna(x)
x=as.matrix(x)
y=as.matrix(y)
res=Kmeans(x,k)
grpid=res[[1]]
grpdat=list()
for(i in 1:k){
flag=(grpid==i)
grpdat[[i]]=y[flag,]
}
grpdat
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.