## Here is a fake batcheable process
fakeProc <- function (file) {
message("Processing ", file, "...")
flush.console()
Sys.sleep(1)
if (runif(1) > 0.7) { # Fails
warning("fakeProc was unable to process ", file)
return(invisible(FALSE))
} else return(invisible(TRUE))
}
## Run it in batch mode on five items
files <- paste("file", 1:5, sep = "")
batch(files, fakeProc)
Run the code above in your browser using DataLab