plot_control_chart: Function to plot a control chart.

View source: R/plot_control_chart.R

plot_control_chartR Documentation

Function to plot a control chart.

Description

Function to plot a control chart.

Usage

plot_control_chart(
  df,
  by = as.character(),
  size = 2,
  control_constant = 1.128,
  control_multiplier = 3,
  add_reference = FALSE,
  scales = "fixed"
)

Arguments

df

Input data frame containing value and date variables.

by

A character vector indicating the grouping variables within df to calculate control limits for and plot as facets.

size

Size of the plots' points.

control_constant

Constant used to transform the mean delta to sequential deviation. Through simulations, this is usually set as 1.128

control_multiplier

Multiplier for sequential deviation to get the lower and upper control limits, typically 3.

add_reference

Should a reference value be added to the plot? This value must be called value_reference in df.

scales

A ggplot2 argument for setting the scales of the facets.

Value

ggplot2 plot.

Author(s)

Stuart K. Grange

See Also

calculate_control_limits


skgrange/threadr documentation built on May 11, 2024, 12:16 p.m.