View source: R/plot_level_frequencies.R
plotLevelFrequencies | R Documentation |
For combinations of columns c1
and c2
in data
,
ggplot-objects are generated each of which shows the number (relative =
FALSE
) or percentage (relative = TRUE
) of the different possible
combinations of values in c1
, and c2
. The combinations of
column names are created from the permutation of column names given in
vars_1
and vars_2
, respectively.
plotLevelFrequencies(data, vars_1 = NULL, vars_2 = NULL, relative = TRUE)
data |
data frame |
vars_1 |
first vector of column names |
vars_2 |
second vector of column names |
relative |
if |
list of objects of class "ggplot"
data <- data.frame(
fruit = c("apple", "cherry", "apple", "banana", "cherry"),
colour = c("green", "red", "red", "yellow", "green"),
size = c("small", "small", "big", "small", "big")
)
plotLevelFrequencies(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.