R/Dist.R

Defines functions Dist

Documented in Dist

Dist<-function(x,y,type) { 

	  diff<-x-y       
	  if(type==1) d<-sqrt(sum(diff^2))
        if(type==2) d<-sum(abs(diff))
        if(type==3) d<-max(abs(diff))

        d
}

Try the MKMeans package in your browser

Any scripts or data that you put into this service are public.

MKMeans documentation built on Oct. 9, 2024, 1:07 a.m.