Description Usage Arguments Examples
Create a product plot
1 2 |
data |
input data frame |
formula |
formula specifying display of plot |
divider |
divider function |
cascade |
cascading amount, per nested layer |
scale_max |
Logical vector of length 1. If |
na.rm |
Logical vector of length 1 - should missing levels be silently removed? |
levels |
an integer vector specifying which levels to draw. |
... |
other arguments passed on to |
1 2 3 4 5 6 7 8 9 10 11 12 | if (require("ggplot2")) {
prodplot(happy, ~ happy, "hbar")
prodplot(happy, ~ happy, "hspine")
prodplot(happy, ~ sex + happy, c("vspine", "hbar"))
prodplot(happy, ~ sex + happy, stacked())
prodplot(happy, ~ happy + sex | health, mosaic("h")) + aes(fill=happy)
# The levels argument can be used to extract a given level of the plot
prodplot(happy, ~ sex + happy, stacked(), level = 1)
prodplot(happy, ~ sex + happy, stacked(), level = 2)
}
|
Loading required package: ggplot2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.