Skip to contents

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,
  ...
)

Arguments

edstr_dirname

<character(1)> Path to the output directory. Created via fs::dir_create() if it does not exist.

edstr_filename

<character(1)> Prefix used to name output files (e.g. "my_study" produces my_study_import.rds, my_study_clean.rds, etc.). Supports glue syntax.

edstr_text

<character(1)> Name of the text column in the data. Used as the default text argument in edstr_clean() and edstr_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.

...

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/RtmpewHAgD with prefix my_study
#> 
#> ────────────────────────────────────────────────────────────────────────────────