Learn R Programming

discoveR (version 3.1.2)

e_cat: Barplot for categoric variable by clusters.

Description

Barplot for categoric variable by clusters.

Usage

e_cat(clusters, var, colores = NULL, escalar = T)

Value

echarts4r plot

Arguments

clusters

a vector specifying the cluster of each individual.

var

a factor column of a data.frame.

colores

a vector of color for each cluster.

escalar

a boolean value specifying if use percentage or real values.

Author

Diego Jimenez <diego.jimenez@promidat.com>

Examples

Run this code
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