Description Usage Arguments Value Examples
View source: R/quickest_detection.R
Plot rolling window statistics and qd alarms
1 2 3 4 5 6 7 8 9 10 |
rolling_window_stats |
data frame of rolling window statistics that is output from |
qd_alarms |
data frame of quickest detection alarms, output from |
var_col |
character vector, variable names that are columns of *data* containing time series to calculate rolling window stats on |
stats |
statistics to plot, default and options are c("SD", "Ar1") |
title |
title to put on the plot |
widths |
numeric vector, rolling window width(s) to be used, default is c(21) |
plot_bloom_lines |
TRUE or FALSE (default), should lines for the bloom dates be plotted? |
bloom_dates |
if plot_bloom_lines = TRUE, this data frame is used to determine where |
a ggplot object
1 2 3 4 5 6 7 8 | use_vars <- c("Manual_Chl", "BGA_HYLB", "DO_Sat", "pH")
rw_stats <- calc_rolling_stats(ts_data, var_cols = use_vars)
qd_stats <- run_qd(rw_stats, var_cols = use_vars)
qd_alarms <- format_qd(qd_stats, bloom_fert_df = bloom_fert_dates)
plot_qd(rw_stats, qd_alarms, use_vars[1],
stats = c("SD", "Ar1"),
plot_bloom_lines = TRUE, bloom_dates = bloom_fert_dates
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.