Learn R Programming

flexclust (version 1.1-0)

barplot-methods: Barplot/chart Methods in Package `flexclust'

Description

Barplot of cluster centers or other cluster statistics.

Usage

## S3 method for class 'kcca':
barplot(height, bycluster = TRUE, oneplot = TRUE,
    data = NULL, FUN=colMeans, main = deparse(substitute(height)), 
    which = 1:height@k, names.arg = NULL,
    oma=par("oma"), col=NULL, mcol="darkred", srt=45, ...)

## S3 method for class 'kcca': barchart(x, data, xlab="", strip.prefix="Cluster ", col=NULL, mcol="darkred", panel=NULL, which=NULL, ...)

Arguments

height, x
An object of class "kcca".
bycluster
If TRUE, then each barplot shows one cluster. If FALSE, then each barplot compares all cluster for one input variable.
oneplot
If TRUE, all barplots are plotted together on one page, else each plot is on a seperate page.
data
If not NULL, cluster membership is predicted for the new data and used for the plots. By default the values from the training data are used. Ignored by the barchart method.
FUN
The function to be applied to each cluster for calculating the bar heights.
which
For barplot index number of clusters for the plot, for barchart index numbers or names of variables to plot.
names.arg
A vector of names to be plotted below each bar.
main, oma, xlab, ...
Graphical parameters.
col
Vector of colors for the clusters.
mcol
If not NULL, the value of FUN for the complete data set is plotted over each bar as a line segment with color mcol.
srt
Number between 0 and 90, rotation of the x-axis labels.
strip.prefix
Prefix string for the strips of the Trellis display.
panel
Panel function for barchart.