get_clusters: Clustering groups returned as dataframe

Description Usage Arguments Value Examples

View source: R/get_clusters.R

Description

Input a distance matrix and returns a dataframe with two columns: area and clustering grouping, where a choice of clustering method is provided.

Usage

1
get_clusters(dist_mat, cluster_num, method)

Arguments

dist_mat

A distance matrix.

cluster_num

Number of clusters.

method

The agglomeration method that is passed to hclust. This can be chosen from the following: "ward.D", "ward.D2", "single", "complete", "average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC).

Value

A map upon which dialect areas are clustered.

A dataframe with the two columns area and (clustering) grouping.

Examples

1
2
3
# Example 1:
data(distDutch)
get_clusters(distDutch, 5 ,"ward.D2")

dialectR documentation built on May 20, 2021, 9:06 a.m.