Write batch files to disk
write_batches.RdPersists each element of a batch list as a standalone .R file
containing an object named x. This allows parallel workers to
safely read and process batches without contention for a shared
.RDS file.
Details
Each batch is written to a file named batches/<batchname>.R inside
the specified path. The function uses purrr::iwalk() to iterate over
the list, ensuring the batch name and data stay paired correctly.