Learn R Programming

sptemExp (version 0.1.4)

getClusterCt: Retrieve the Central Coordinates for Each Cluser after Clustering Done.

Description

This function is the second step for Adaptive Kruskal algorithm for generating aggregate centers for Thiessen polygons with the aim to obtain the central point for each cluster.

Usage

getClusterCt(samples, clsInf)

Arguments

samples

Data frame for samples with the columns of coordinates (column name: x and y)

clsInf

Cluster results obtained from the fucntion,exeCluster

Value

vector format: coordinates (x and y) for each cluster

Details

Retrieve the central point for each cluster.

References

Thomas, C.; Leiserson, C.; Rivest, R.; Stein, C., Introduction To Algorithms (Third ed.). MIT Press: 2009

See Also

exeCluster, ~~~

Examples

Run this code
# NOT RUN {
samplePnt=data.frame(x=runif(100,1,100),y=runif(100,1,100))
clusterId=exeCluster(samplePnt,10)
clscenters=getClusterCt(samplePnt,clusterId)
# }

Run the code above in your browser using DataLab