R/curve_snowflake.R
curve_snowflake_batch.RdExecutes multiple queries against a Snowflake database and constructs consonance distributions for each result set.
curve_snowflake_batch(conn, queries, estimate_col = "estimate",
lower_col = "lower", upper_col = "upper", conf.level = 0.95,
steps = 1000, cores = getOption("mc.cores", 1L), table = TRUE)A DBI connection object to Snowflake database.
A named list of SQL query strings.
Name of the column containing point estimates.
Name of the column containing lower bounds.
Name of the column containing upper bounds.
Confidence level of the input intervals. Default is 0.95.
Number of consonance levels to compute. Default is 1000.
Number of cores for parallel computation.
Logical. If TRUE (default), includes summary tables.
A named list of concurve objects, one for each query.
curve_snowflake() for single query processing
plot_compare() for comparing results
if (FALSE) { # \dontrun{
queries <- list(
"Model A" = "SELECT estimate, lower_ci, upper_ci FROM results WHERE model = 'A'",
"Model B" = "SELECT estimate, lower_ci, upper_ci FROM results WHERE model = 'B'"
)
results <- curve_snowflake_batch(conn, queries,
estimate_col = "estimate",
lower_col = "lower_ci",
upper_col = "upper_ci"
)
# Plot comparison
plot_compare(results[["Model A"]][[1]], results[["Model B"]][[1]])
} # }