plot_gg: plot qcc using ggplot

Description Usage Arguments Value Methods (by class) Examples

View source: R/qccOperations.R

Description

plot qcc using ggplot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plot_gg(x, ...)

## S3 method for class 'qcc'
plot_gg(
  x,
  add.stats = TRUE,
  chart.all = TRUE,
  label.limits = c("LCL ", "UCL"),
  gr_func = as.numeric,
  ...
)

Arguments

x

a qcc object

...

currently not used

add.stats

currently not used

chart.all

currently not used

label.limits

a character vector specifying the labels for control limits.

gr_func

function to apply to group labels, useful for dates or numbers. Set this to as.numeric or as.Date when your groups are numbers/dates respectively

Value

a ggplot2 plot object

Methods (by class)

Examples

1
2
3
4
5
6
7
data("pistonrings", package = 'qcc')
diameter <- qcc::qcc.groups(pistonrings$diameter, pistonrings$sample)
qcc_obj <- qcc::qcc(diameter[1:25,], type="xbar")
plot_gg.qcc(qcc_obj)

qcc_new <-  qcc::qcc(diameter[1:25,], newdata = diameter[24:40,], type="xbar")
plot_gg.qcc(qcc_new)

West-End-Statistics/r-library-vakdr documentation built on Dec. 18, 2021, 7:16 p.m.