cc2plot: Plot a Control Chart.

Description Usage Arguments Examples

View source: R/cchart.R

Description

Plots a Control Chart. Receives as input a ccpoints object.

Usage

1
cc2plot (data, data.title = "")

Arguments

data

A ccpoints object. See ?ccharter::ccpoints function for reference.

data.title

Title for the Control Chart plot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Create a random time series
set.seed(154)
time.series <- data.frame(t.dates = seq.Date(as.Date("2014-02-01"), as.Date("2016-08-01"), "month"),
               t.values = c(
               seq(0.1, 0.8, by = 0.1) * runif(8) + 3,
               seq(0.1, 0.7, by = 0.1) * runif(7) + 4,
               seq(0.1, 0.7, by = 0.1) * runif(7) + 5,
               seq(0.1, 0.4, by = 0.1) * runif(4) + 4,
               seq(0.1, 0.5, by = 0.1) * runif(5) + 4)
               )

# Execute function
control.chart.data <- ccpoints(time.series, "t.dates", "t.values")

# Create chart
cc2plot(control.chart.data)

jbaxx/ccharter documentation built on Feb. 27, 2021, 9:10 p.m.