powered by
Barplot for categoric variable by clusters.
e_cat(clusters, var, colores = NULL, escalar = T)
echarts4r plot
a vector specifying the cluster of each individual.
a factor column of a data.frame.
a vector of color for each cluster.
a boolean value specifying if use percentage or real values.
Diego Jimenez <diego.jimenez@promidat.com>
clusters <- factor(kmeans(iris[, -5], 3)$cluster) e_cat(clusters, iris[, 5], colores = c("steelblue", "pink", "forestgreen"))
Run the code above in your browser using DataLab