View source: R/plot.kclustering.R
plot.kclustering | R Documentation |
Plot k-means clustering from a 'kclustering' object
## S3 method for class 'kclustering'
plot(
x,
title = NULL,
ncol.arrange = NULL,
min.mid.max = NULL,
label.size = 2.5,
...
)
x |
an object of class |
title |
character or vector of characters (when plotting radial plots of cluster profiles; see Value), plot title(s). |
ncol.arrange |
integer, number of columns when arranging multiple grobs on a page (active when plotting radial plots of cluster profiles; see Value). |
min.mid.max |
numeric vector with 3 elements: lower bound, middle dashed line, upper bound for radial axis (active when plotting radial plots of cluster profiles; see Value). |
label.size |
numeric; label font size (default 2.5). |
... |
other graphical parameters. |
If x$k
is NULL
, plot.kclustering
returns a single ggplot2
object, displaying the pattern of the explained variance vs the number of clusters.
If x$k
is not NULL
, plot.kclustering
returns a list of ggplot2
objects, displaying the radial plots of the cluster profiles.
Marco Sandri, Paola Zuccolotto, Marica Manisera (basketballanalyzer.help@unibs.it)
P. Zuccolotto and M. Manisera (2020) Basketball Data Science: With Applications in R. CRC Press.
kclustering
, radialprofile
FF <- fourfactors(Tbox,Obox)
X <- with(FF, data.frame(OD.Rtg=ORtg/DRtg,
F1.r=F1.Def/F1.Off, F2.r=F2.Off/F2.Def,
F3.O=F3.Def, F3.D=F3.Off))
X$P3M <- Tbox$P3M
X$STL.r <- Tbox$STL/Obox$STL
kclu1 <- kclustering(X)
plot(kclu1)
kclu2 <- kclustering(X, k=9)
plot(kclu2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.