Aggregate Batched Analysis Results
aggregate_batch_results.RdReads all batch_*.rds files from a directory and combines them.
Examples
# \donttest{
cif_path <- system.file("extdata", "1590946.cif", package = "crystract")
if (file.exists(cif_path)) {
out_dir <- file.path(tempdir(), "cif_batches")
analyze_cif_files(cif_path, output_dir = out_dir)
aggr <- aggregate_batch_results(out_dir)
unlink(out_dir, recursive = TRUE)
}
#> Starting analysis of 1 files in 1 batches.
#>
#> --- Processing Batch 1 of 1 (Files 1 to 1) ---
#> Batch 1 complete. Saved 1 results to '/tmp/RtmpYktJzZ/cif_batches/batch_1.rds'.
#> ----------------------------------
#> Analysis Complete!
#> Batch results have been saved in the '/tmp/RtmpYktJzZ/cif_batches/' directory.
#> Found 1 batch files to aggregate.
#> Aggregation complete. Total rows: 1.
# }