generic_recoding {rock} | R Documentation |
Generic underlying recoding function
Description
This function contains the general set of actions that are always used when recoding a source (e.g. check the input, document the justification, etc). Users should normally never call this function.
Usage
generic_recoding(
input,
codes,
func,
filenameRegex = ".*",
filter = TRUE,
output = NULL,
outputPrefix = "",
outputSuffix = "_recoded",
decisionLabel = NULL,
justification = NULL,
justificationFile = NULL,
preventOverwriting = rock::opts$get("preventOverwriting"),
encoding = rock::opts$get("encoding"),
silent = rock::opts$get("silent"),
...
)
Arguments
input |
One of 1) a character string specifying the path to a file
with a source; 2) an object with a loaded source as produced by a call
to |
codes |
The codes to process |
func |
The function to apply. |
filenameRegex |
Only process files matching this regular expression. |
filter |
Optionally, a filter to apply to specify a subset of the
source(s) to process (see |
output |
If specified, the coded source will be written here. |
outputPrefix , outputSuffix |
The prefix and suffix to add to the filenames when writing the processed files to disk, in case multiple sources are passed as input. |
decisionLabel |
A description of the (recoding) decision that was taken. |
justification |
The justification for this action. |
justificationFile |
If specified, the justification is appended to
this file. If not, it is saved to the |
preventOverwriting |
Whether to prevent overwriting existing files
when writing the files to |
encoding |
The encoding to use. |
silent |
Whether to be chatty or quiet. |
... |
Other arguments to pass to |
Value
Invisibly, the recoded source(s) or source(s) object.