cluster_map: Visualize dialect groups with clustering methods

Description Usage Arguments Value Examples

View source: R/cluster_map.R

Description

Input a distance matrix, upon which clustering will be performed and projected unto a map.

Usage

1
cluster_map(dist_mat, kml_points, kml_polygon, cluster_num, method)

Arguments

dist_mat

A distance matrix.

kml_points

A dataframe of kml (Keyhole Markup Language) points, as retrieved by get_points.

kml_polygon

A dataframe of kml polygons, as retrieved by get_polygons.

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.

Examples

1
2
3
4
5
# Example 1: A cluster map of Dutch dialects
data(distDutch)
dutch_points <- get_points(system.file("extdata", "DutchKML.kml", package="dialectR"))
dutch_polygons <- get_polygons(system.file("extdata", "DutchKML.kml", package="dialectR"))
cluster_map(distDutch[1:100,1:100], dutch_points, dutch_polygons, 5, "ward.D2")

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