Set global options used by all downstream functions (edstr_import(),
edstr_clean(), edstr_extract(), edstr_view()). Creates the output
directory if it does not exist. edstr_dirname and edstr_filename
support glue syntax (e.g. "{Sys.Date()}").
Usage
edstr_config(
edstr_dirname,
edstr_filename,
edstr_text = NULL,
edstr_overwrite = NULL,
edstr_connect_dir = NULL,
...
)Arguments
- edstr_dirname
<character(1)>Path to the output directory. Created viafs::dir_create()if it does not exist.- edstr_filename
<character(1)>Prefix used to name output files (e.g."my_study"producesmy_study_import.parquetandmy_study_clean.parquet;edstr_extract()writesmy_study_extract.xlsx,.jsonand.rdsinto anextract/subdirectory). Supports glue syntax.- edstr_text
<character(1)>Name of the text column in the data. Supplies the defaulttextargument ofedstr_clean()and the defaulttext_inputargument ofedstr_extract()andedstr_view().- edstr_overwrite
<logical(1)>Controls caching behaviour when an output file already exists:TRUE: overwrite without prompting.FALSE: load the cached file without prompting.NULL(default): prompt the user interactively.
- edstr_connect_dir
<character(1)>Path to the YAML connection file holding the driver, address and TNS entriesedstr_import()reads. Supplies its defaultconnect_dirargument. The file is read whenedstr_import()runs, so it need not exist yet.- ...
Additional options passed to
options().
Value
Invisibly returns NULL. Called for its side effects (setting
R options and printing a configuration summary).
Examples
edstr_config(
edstr_dirname = tempdir(),
edstr_filename = "my_study",
edstr_text = "note_text",
edstr_overwrite = TRUE
)
#>
#> ── edstr_config ────────────────────────────────────────────────────────────────
#>
#> ℹ Root : /home/runner/work/edstr/edstr
#>
#> ℹ Files will be saved in /tmp/RtmpbqjexN with prefix my_study
#>
#> ────────────────────────────────────────────────────────────────────────────────