check_drift: Visualize trend in variables across another

Description Usage Arguments Value Examples

View source: R/check_drift.R

Description

Returns a plot showing the distribution of a variable by different levels of another grouping variable. A common application in my work is making sure the distribution doesn't change across different seasons.

Usage

1
check_drift(.data, formula, bins = NULL, theme = NULL)

Arguments

.data

a data frame containing the data in question

formula

a formula with the variable on the lhs and grouping variable on the rhs

bins

the number of bins to make. If NULL (default) then each variable value will be used.

theme

a sequence of ggplot2 theme objects

Value

a ggplot2 object showing the distribution of the variable colored by group

Examples

1
2
check_drift(iris, Petal.Width ~ Species, bins = 5)
check_drift(mtcars, cyl ~ am, bins = NULL)

mattmills49/modeler documentation built on May 21, 2019, 1:25 p.m.