Learn R Programming

MKMeans (version 3.3)

C.f: Finding the center of a cluster.

Description

It's a function of finding the center of a cluster.

Usage

C.f(dat, type)

Value

A vector.

Arguments

dat

Numeric. A cluster matrix with each row being an observaion.

type

Integer. The type of distance between observations. 1 for Euclidean distance. 2 for Manhattan distance. 3 for maximum deviation along dimensions.

Author

Yarong Yang

Examples

Run this code
x<-rnorm(5,0,1)
y<-rnorm(5,1,1)
data<-cbind(x,y)
Res<-C.f(dat=data,type=1)

Run the code above in your browser using DataLab