ggcascade | R Documentation |
ggcascade(
.data,
...,
.weights = NULL,
.by = NULL,
.nrow = NULL,
.ncol = NULL,
.add_n = TRUE,
.text_size = 4,
.arrows = TRUE
)
compute_cascade(.data, ..., .weights = NULL, .by = NULL)
plot_cascade(
.data,
.by = NULL,
.nrow = NULL,
.ncol = NULL,
.add_n = TRUE,
.text_size = 4,
.arrows = TRUE
)
.data |
A data frame, or data frame extension (e.g. a tibble). For
|
... |
< |
.weights |
< |
.by |
< |
.nrow , .ncol |
Number of rows and columns, for faceted plots. |
.add_n |
Display the number of observations? |
.text_size |
Size of the labels, passed to |
.arrows |
Display arrows between statuses? |
ggcascade()
calls compute_cascade()
to generate a data set passed
to plot_cascade()
. Use compute_cascade()
and plot_cascade()
for
more controls.
A ggplot2
plot or a tibble
.
ggplot2::diamonds |>
ggcascade(
all = TRUE,
big = carat > .5,
"big & ideal" = carat > .5 & cut == "Ideal"
)
ggplot2::mpg |>
ggcascade(
all = TRUE,
recent = year > 2000,
"recent & economic" = year > 2000 & displ < 3,
.by = cyl,
.ncol = 3,
.arrows = FALSE,
.text_size = 3
)
ggplot2::mpg |>
ggcascade(
all = TRUE,
recent = year > 2000,
"recent & economic" = year > 2000 & displ < 3,
.by = pick(cyl, drv),
.add_n = FALSE,
.text_size = 2
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.