View source: R/plot_clusters.R
plot_clusters | R Documentation |
This functions plots the data as histogram, coloured according to the hard clustering assignments. This function must receive in input exactly the same data used for the fit.
plot_clusters(x, data)
x |
An object of class |
data |
The data used to compute the fit |
A ggplot object.
# The same dataset used in the package vignette data = data.frame(successes = c(rbinom(30, 100, .4), rbinom(70, 100, .7)), trials = 100) # BMix fit with default parameters x = bmixfit(data) plot_clusters(x, data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.