Learn R Programming

sjPlot (version 2.0.0)

sjc.dend: Compute hierarchical cluster analysis and visualize group classification

Description

Computes a hierarchical cluster analysis and plots a hierarchical dendrogram with highlighted rectangles around the classified groups. Can be used, for instance, as visual tool to verify the elbow-criterion (see sjc.elbow).

Usage

sjc.dend(data, groupcount, distance = "euclidean", agglomeration = "ward")

Arguments

Examples

Run this code
# Plot dendrogram of hierarchical clustering of mtcars-dataset
# and show group classification
sjc.dend(mtcars, 5)

# Plot dendrogram of hierarchical clustering of mtcars-dataset
# and show group classification for 2 to 4 groups
sjc.dend(mtcars, 2:4)

Run the code above in your browser using DataLab