barplotCluster {Rmixmod}R Documentation

Barplot of a class [MixmodResults]

Description

Barplot of qualitative data object using parameters from a [MixmodResults] to plot probabilities of modalities.

Usage

barplotCluster(
  x,
  data,
  variables = colnames(data),
  main = paste("Barplot of", variables),
  ...
)

Arguments

x

an object of class [MixmodResults]

data

a vector or data frame containing a qualitative data set.

variables

list of variables names (or indices) to compute a barplot. All variables from data by default.

main

a list of title for the barplot. main must have the same length than variables.

...

further arguments passed to or from other methods

Details

Each line corresponds to one variable. A barplot is drawn for each cluster with the probabilities for each modality to be in that cluster.

See Also

barplot

Examples

data(birds)
xem <- mixmodCluster(birds, 2)
barplotCluster(xem["bestResult"], birds)
barplotCluster(xem["bestResult"], birds, variables = c(2, 3, 4))
barplotCluster(xem["bestResult"], birds, variables = c("eyebrow", "collar"))

[Package Rmixmod version 2.1.10 Index]