Description Usage Arguments Examples
Plots a Control Chart. Receives as input a ccpoints object.
1 | cc2plot (data, data.title = "")
|
data |
A ccpoints object. See ?ccharter::ccpoints function for reference. |
data.title |
Title for the Control Chart plot. |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.