GG_kmeans: Scatter plot with kmeans clustering

GG_kmeansR Documentation

Scatter plot with kmeans clustering

Description

Performs kmeans and factor analysis on a dataset. Then plots a scatter plot using the first two factors (orthogonal) and color codes cases by their kmeans cluster.

Usage

GG_kmeans(df, clusters, runs = 100, standardize = T)

Arguments

df

A data.frame with variables.

clusters

The number of clusters to find.

runs

Number of runs to use. The best run is used in the plot.

standardize

Whether to standardize the data first. Defaults to TRUE.

Examples

GG_kmeans(iris[-5], 3)

Deleetdk/kirkegaard documentation built on Feb. 28, 2025, 5:04 p.m.