These functions are designed to be called by build_plots as part of the flyover workflow, but can also be used as standalone plotting utilities. Each function has identical arguments, but each will produce a different visual comparison of data across groups depeding on the data type to be compared and the geom selected. The output can by modified by directly adding ggplot2 layers in the usual way.

flyover_histogram(tbl, var, group_var, ...)

flyover_density(tbl, var, group_var, ...)

flyover_binline_ridges(tbl, var, group_var, ...)

flyover_density_ridges(tbl, var, group_var, ...)

flyover_bar_dodge(tbl, var, group_var, ...)

flyover_bar_fill(tbl, var, group_var, ...)

flyover_na_percent(tbl, var, group_var, ...)

flyover_na_count(tbl, var, group_var, ...)

Arguments

tbl

A tibble containing the variable of interest and the grouping variable.

var

Character string; the variable name whose distribution is of interest.

group_var

Character string; the variable name defining different groups.

...

Additional arguments to pass to the geom of the supplied flyover plot function.

Value

A plot object generated by the ggplot2 package.

Examples

if (FALSE) {
x <- tibble::tibble(group = rep(c("old", "new"), each = 100),
                    rand  = c(rnorm(100), rnorm(100, mean = 1)))
flyover_histogram(x, "rand", "group")

y <- tibble::tibble(group = rep(c("old", "new"), each = 100),
                    rand  = sample(letters[1:4], 200, replace = TRUE))
flyover_bar_fill(y, "rand", "group")
}