Updates the function and function arguments that were provided
when a directory was configured (using batch_config()
).
batch_reconfig_fun(path, fun, ...)
A string of the path to the directory with the files for processing.
A function to process each of the files.
fun
's first argument should be a string of the path to a single file.
If processing is unsuccessful fun
should return FALSE
or throw an error (error messages are caught and automatically logged).
If fun deletes or modifies the file then it is no longer considered
for processing.
Additional arguments passed to fun
.
An invisible character vector of the paths to the files remaining to be processed.
batch_reconfig_fun()
is useful if a new version of the function is required
to successfully process some of the files.
It should be noted that batch_reconfig_fun()
does not alter the
configuration time.
In order to process previously failed files batch_run()
should be called with failed = NA
or failed = TRUE
.