| export_results | R Documentation |
Exports analysis results to Excel and/or CSV format.
export_results(results, output_dir, format = "xlsx", verbose = TRUE)
results |
Named list containing analysis results. Expected components include: hurdle, te, te_by_type (list with counts/rates/binary), placebo, tvarstar, varx, eba, dbn_arcs, hmm, sensemakr_I, sensemakr_C, oos, ate. |
output_dir |
Directory path for output files. Created if it does not exist. |
format |
Character; output format. One of "xlsx", "csv", or "both". |
verbose |
Logical; if TRUE, print progress messages. |
Invisible path to output directory.
results <- list(
hurdle = data.frame(model = "test", elpd = -100),
te = data.frame(dir = "I->C", stat = 0.5, p_value = 0.01)
)
# CSV export uses only imported packages and always works:
export_results(results, tempdir(), format = "csv", verbose = FALSE)
# Excel export additionally requires the 'openxlsx' package:
if (requireNamespace("openxlsx", quietly = TRUE)) {
export_results(results, tempdir(), format = "xlsx", verbose = FALSE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.