R/dist2Centers.R

Defines functions dist2Centers

dist2Centers <- function(x,centers){
  min(unlist(sapply(seq_len(nrow(centers)), function(rw){sum((x-centers[rw,])^2)})))
} #end dist2Centers
Noobivsho/ssClust documentation built on Aug. 10, 2019, 5:47 a.m.