getAllDist2Centers<-function(data,matCenters){
sapply(1:nrow(data),function(rw){
dist2Centers(data[rw,],matCenters)
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.