View source: R/finalize_textcleaner.R
| finalize_textcleaner | R Documentation |
textcleaner() ResultReviews automated spell-check corrections and builds the
final cleaned/binary/behavioral output – the exact logic
textcleaner itself runs once, internally, via a pure code
motion. Exposed so textcleaner_shiny's
corrections-review module can re-run this same, already-tested logic a
second time once the user's real edits (from the embedded
automated_edit_server) are known, instead of duplicating
it. Byte-identical behavior to textcleaner()'s own original inline
block, covered by the full test-textcleaner.R suite unchanged.
Exported (not just internal) because inst/Shiny/'s own module
files are sourced into the global environment by Shiny's own app-loading
mechanism, not into the package namespace – an unexported function is
not reachable from there by its bare name.
finalize_textcleaner(
res,
data,
type,
ids,
reader = readline,
edit_fn = automated_edit,
spell_check = res,
keep_repeats = FALSE
)
res |
List.
The in-progress |
data |
Matrix or data frame.
The already-spell-checked response data ( |
type |
Character.
|
ids |
Character vector.
Participant IDs ( |
reader |
Function.
Passed through to |
edit_fn |
Function.
The automated-corrections review function. Defaults to
|
spell_check |
List.
The error-path fallback return value, matching |
keep_repeats |
Boolean.
Should repeated responses (perseverations) be kept in the cleaned
responses? Only applies to |
A finished, textcleaner-classed result
Alexander Christensen <alexpaulchristensen@gmail.com>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.