Learn R Programming

LearnClust (version 1.1)

getCluster: To get the clusters with minimal distance.

Description

To get the clusters with the minimal distance value. By using the given distance, it gets the matrix index.

Usage

getCluster(distance, matrix)

Arguments

distance

is a number. It should be in the matrix.

matrix

is a numeric matrix.

Value

numeric vector with two cluster indexs.

Details

This function is part of the hierarchical clusterization method. The function uses the distance value and gets the clustersId with the minimal distance.

For the divisive algorithm, it chooses the distances from a distances list.

Examples

Run this code
# NOT RUN {
matrixExample <- matrix(c(1:10), ncol=2)

getCluster(2,matrixExample)

# }

Run the code above in your browser using DataLab