plot.kMeans: Plot Method for K-Means Clustering

Description Usage Arguments See Also Examples

View source: R/plot.kMeans.R

Description

Plot method for objects of class "kMeans". Calls plot function to produce a scatter plot of the data values and cluster assignments provided by the given kMeans object.

Usage

1

Arguments

X

an object of the class kMeans.

col

a specification for the plotting color.

pch

either an integer specifying a symbol or a single character to be used as the default in plotting points. See points for possible values and their interpretation.

...

further arguments to be passed to or from methods.

See Also

par

Examples

1
2
3
4
5
6
7
set.seed(63555)
exampleData <- matrix(nrow=90, ncol=1)
exampleData[1:30, 1] <- rnorm(30, mean=3, sd=1)
exampleData[31:60, 1] <- rnorm(30, mean=6, sd=1)
exampleData[61:90, 1] <- rnorm(30, mean=9, sd=1)
kMeansResult <- kMeans(exampleData, k=3)
plot(kMeansResult)

rintakumpu/custom-kmeans documentation built on May 3, 2019, 10:45 p.m.