Learn R Programming

rAmCharts (version 2.1.7)

amMekko: Plotting mekko chart (quali vs quali) using rAmCharts

Description

amMekko computes a mekko chart of the given values.

Usage

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

Run this code
# NOT RUN {
data(data_mekko)
amMekko(x = "var1", y = "var2", data = data_mekko)

# }
# NOT RUN {
# 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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab