Description Usage Arguments Value Examples
View source: R/cusum_control_plot.R
cusum_control_plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
df |
input data frame generated by cusum_control function |
xvar |
the variable on the x axis, typically an obervation number or date/time |
show_below |
whether to highlight points below the LCL, default is FALSE |
pos_col |
line and point colour for positive values |
centre_col |
line colour for centre line |
neg_col |
line nd point colour for negative values |
highlight_col |
|
facet_var |
|
facet_scales |
defaults to "free_y", but any of the usual ggplot2 facet values can be supplied e.g. "fixed" or "free_x" |
scale_type |
if you need a date or datetime scale, specify either "date" or "datetime" here. Otherwise, leave as NULL and ggplot2 will pick an appropriate scale for you |
datebreaks |
a character string specifying the breaks as text e.g "2 days" or "3 weeks". See ggplot2 date_breaks for further details |
title_text |
optional title for chart |
... |
further arguments passed on to ggplot2 |
ggplot2 object suited for further amendments if required.
1 2 3 | test_vec3 <- c(1,1,2,3,5,7,11,7,5,7,8,9,5)
controls <- cusum_control(test_vec3, target = 4)
cusum_control_plot(controls, xvar = obs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.