Learn R Programming

batchr (version 0.0.2)

batch_reconfig_fileset: Reconfigures Batch Processing File Set

Description

Updates the regular expression and/or recurse argument that were provided when a directory was configured (using batch_config()).

Usage

batch_reconfig_fileset(path, regexp = NULL, recurse = NULL)

Arguments

path

A string of the path to the directory with the files for processing.

regexp

A string of a regular expression. Only non-hidden file names which match the regular expression will be batch processed.

recurse

A flag specifying whether to recurse into path's subdirectories.

Value

An invisible character vector of the paths to the files remaining to be processed.

Details

batch_reconfig_fileset() is useful for including or excluding particular 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.

See Also

batch_process() and batch_config()

Examples

Run this code
# NOT RUN {
path <- tempdir()
write.csv(mtcars, file.path(path, "file1.csv"))
batch_config(function(x) TRUE, path, regexp = "[.]csv$")
batch_config_read(path)
batch_reconfig_fileset(path, regexp = "file\\d+[.]csv$")
batch_config_read(path)
batch_cleanup(path, force = TRUE, remaining = TRUE)
unlink(file.path(path, "file1.csv"))
# }

Run the code above in your browser using DataLab