preprocess_source {rock} | R Documentation |
Efficiently preprocess data
Description
Efficiently preprocess data
Usage
preprocess_source(
input,
output = NULL,
clean = TRUE,
cleaningArgs = NULL,
wordwrap = TRUE,
wrappingArgs = NULL,
prependUIDs = TRUE,
UIDArgs = NULL,
preventOverwriting = rock::opts$get("preventOverwriting"),
encoding = rock::opts$get("encoding"),
rlWarn = rock::opts$get("rlWarn"),
silent = rock::opts$get("silent")
)
Arguments
input |
The source |
output |
For |
clean |
Whether to clean |
cleaningArgs |
Arguments to use for cleaning |
wordwrap |
Whether to wordwrap |
wrappingArgs |
Arguments to use for word wrapping |
prependUIDs |
Whether to prepend UIDs |
UIDArgs |
Arguments to use for prepending UIDs |
preventOverwriting |
Whether to prevent overwriting of output files. |
encoding |
The encoding of the source(s). |
rlWarn |
Whether to let |
silent |
Whether to suppress the warning about not editing the cleaned source. |
Value
The preprocessed source as character vector.
Examples
exampleText <-
paste0(
"Lorem ipsum dolor sit amet, consectetur ",
"adipiscing elit. Nunc non commodo ex, ac ",
"varius mi. Praesent feugiat nunc eget urna ",
"euismod lobortis. Sed hendrerit suscipit ",
"nisl, ac tempus magna porta et. ",
"Quisque libero massa, tempus vel tristique ",
"lacinia, tristique in nulla. Nam cursus enim ",
"dui, non ornare est tempor eu. Vivamus et massa ",
"consectetur, tristique magna eget, viverra elit."
);
### Show example text
cat(exampleText);
### Show preprocessed example text
rock::preprocess_source(
exampleText
);