Description Usage Arguments Details
The function (f) will be applied to the files in a directory (in a lapply/sapply/vapply-style).
1 2 3 |
f |
function that will be applied to all files in sourceDir |
sourceDir |
source directory with files to be processed |
targetDir |
target directory where the processed files will be saved |
pattern |
pattern (can be a regex) that will be used by |
mc |
logical, whether to use multicore/parallel processing, if numeric, the number of cores to use |
progress |
logical, whether to show progress bar |
verbose |
logical, whether to be verbose |
sample |
defults to FALSE, if a numeric, a number of random files to process |
filenames |
character vector with filenames to be used, a subset of files in |
continue |
work only on those files not yet present in target dir |
failsafe |
whether to be robust and catch errors using |
param |
a list with parameters to be passed to the function f |
Function f passes in a function that will be applied to the individual files in the source directory (sourceDir). The function needs to conform to a standardized format, parameters required are "filename" (character), "sourceDir" (character), "targetDir" (character) and "param" (list).
The function f can be applied in a multicore mode. If progress is FALSE
, then
mclapply
will be used. If progress is TRUE
, pblapply
from
the package pbapply
will be used.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.