Description Usage Arguments Value Examples
Plot true and false positive quickest detection alarm rates
1 2 3 4 5 6 7 8 | plot_alarm_rates(
qd_alarm_rates,
var_rename_vec = c(`Chl-a` = "Manual_Chl", Phyco = "BGA_HYLB", `D.O. sat.` =
"DO_Sat", pH = "pH"),
y_lim = NULL,
plot_title = NULL,
legend_title = "Positive Alarm Rate"
)
|
qd_alarm_rates |
data frame, output from call to |
var_rename_vec |
named vector, used to change variable names displayed in plot, format is c("new name" = "original name") |
y_lim |
numeric vector of length 2, optionally specify y limits manually |
plot_title |
character string, optional main title for plot |
legend_title |
character string, optional title for legend |
ggplot2 object, bar plot giving the true and false positive rates
1 2 3 4 5 6 7 | use_vars <- c("Manual_Chl", "BGA_HYLB", "DO_Sat", "pH")
rw_data <- ts_data %>% dplyr::filter(Year >= 2011)
rw_stats <- calc_rolling_stats(rw_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)
qd_rates <- calc_alarm_rates(qd_alarms)
plot_alarm_rates(qd_alarm_rates = qd_rates)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.