Plotting mekko chart (quali vs quali) using rAmCharts

Share:

Description

amMekko computes a mekko chart of the given values.

Usage

1
2
amMekko(x, y, data, xlab = "", ylab = "", groups_color = NULL,
  horiz = FALSE, show_values = FALSE, ...)

Arguments

x

character, column name for x-axis.

y

character, column name for y-axis.

data

data.frame, dataframe with values to display. See data_mekko

xlab

character, label for x-axis.

ylab

character, label for y-axis.

groups_color

character vector of colors in hexadecimal, same length as the number of y modalities.

horiz

logical, TRUE for an horizontal chart, FALSE for a vertical one.

show_values

logical, TRUE to display values.

...

see amOptions for more options.

See Also

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(data_mekko)
amMekko(x = "var1", y = "var2", data = data_mekko)


# Other examples available which can be time consuming depending on your configuration.
library(pipeR)
 
# Horizontal
amMekko(x = "var1", y = "var2", data = data_mekko, horiz = TRUE)
 
# Display values
amMekko(x = "var1", y = "var2", data = data_mekko, show_values = TRUE)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.