batch_cleanup | R Documentation |
Deletes configuration file created by batch_config()
and log file created by batch_run()
.
batch_cleanup(
path,
force = FALSE,
remaining = FALSE,
failed = NA,
recursive = FALSE,
silent = FALSE
)
path |
A string of the path to the directory with the files for processing. |
force |
A flag specifying whether to delete configuration and log files even if there are files remaining to be processed. |
remaining |
A flag specifying whether to delete
any files that are remaining to be processed
(only applied when |
failed |
A logical scalar specifying how to treat files that previously failed to process. If FALSE (the default) failed files are excluded, if NA they are included and if TRUE they are only included. |
recursive |
A flag specifying whether to recurse into subdirectories
when cleaning up. This is unrelated to the |
silent |
A flag specifying whether to suppress warnings (and messages). |
The batch_completed()
function can be used to test
if batch processing is complete.
A named logical vector indicating which directories were successfully cleaned up.
batch_process()
path <- tempdir()
write.csv(mtcars, file.path(path, "file1.csv"))
batch_config(function(x) TRUE, path, regexp = "[.]csv$")
batch_run(path, ask = FALSE)
batch_cleanup(path)
unlink(file.path(path, "file1.csv"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.