bwplot-methods {flexclust} | R Documentation |
Box-Whisker Plot Methods in Package ‘flexclust’
Description
Seperate boxplot of variables in each cluster in comparison with boxplot for complete sample.
Usage
## S4 method for signature 'kcca'
bwplot(x, data, xlab="",
strip.labels=NULL, strip.prefix="Cluster ",
col=NULL, shade=!is.null(shadefun), shadefun=NULL, byvar=FALSE, ...)
## S4 method for signature 'bclust'
bwplot(x, k=x@k, xlab="", strip.labels=NULL,
strip.prefix="Cluster ", clusters=1:k, ...)
Arguments
x |
An object of class |
data |
If not |
xlab , ... |
Graphical parameters. |
col |
Vector of colors for the clusters. |
strip.labels |
Vector of strings for the strips of the Trellis display. |
strip.prefix |
Prefix string for the strips of the Trellis display. |
shade |
If |
shadefun |
A function or name of a function to compute which
boxes are shaded, e.g. |
byvar |
If |
k |
Number of clusters. |
clusters |
Integer vector of clusters to plot. |
Examples
set.seed(1)
cl <- cclust(iris[,-5], k=3, save.data=TRUE)
bwplot(cl)
bwplot(cl, byvar=TRUE)
## fill only boxes with color which do not contain the overall median
## (grey dot of background box)
bwplot(cl, shade=TRUE)
## fill only boxes with color which do not overlap with the box of the
## complete sample (grey background box)
bwplot(cl, shadefun="boxOverlap")