| read_bma_all | R Documentation |
Searches for BMA weight CSV files produced by the Hurdle-NB model, reads them using automatic delimiter detection, and returns a single stacked data frame with normalized column names and a combo identifier.
read_bma_all(dir_csv, dir_out, stop_if_empty = TRUE, verbose = TRUE)
dir_csv |
Character scalar; directory where BMA CSV files are
expected (for example |
dir_out |
Character scalar; output directory used during the experiment, which may contain BMA files or a fallback RDS object. |
stop_if_empty |
Logical; if |
verbose |
Logical; if |
The function:
Looks for CSV files matching the pattern
"bma_weights_specC_ctrl*.csv" in dir_csv, and if
none are found, searches recursively in dir_out.
Reads each candidate file via rc_auto() and keeps only
non-empty data frames.
If no CSV files are usable, optionally falls back to an RDS
file "experimento_mejorado_all.rds" under dir_out
and tries to extract BMA tables from allobj$bma.
Normalizes column names with normalize_names(), ensures
a combo column exists, detects the ELPD column, and sorts
rows by decreasing ELPD.
A data frame with all BMA tables stacked and an added
combo_id column (source identifier) and a combo
column (control combo). If nothing is found and
stop_if_empty = FALSE, an empty tibble is returned.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.