Skip to contents

A modifyList()-style edit of one section of a style YAML, without hand-copying the rest of the file.

Usage

styling_update_style(updates, file, yes = FALSE)

Arguments

updates

A (possibly nested) list of the values to change, e.g. list(heading = list(all_caps = TRUE)).

file

The style YAML to update, in place.

yes

Must be TRUE to actually write – see above.

Value

The style YAML's full merged content, as a nested list (invisibly).

Details

Requires yes = TRUE: there's no live stdin to confirm over via this R wrapper (it always calls the underlying CLI with --json, a non-interactive/piped invocation, same as styling_sync_reportifyr_config()), and this always has something to change (unlike that function, which can no-op) – passing yes = TRUE is this function's explicit acknowledgement that rewriting the file via yaml.safe_dump drops any comments/formatting it had.

Examples

if (FALSE) { # \dontrun{
# Requires a provisioned quartifyr Python environment (see
# initialize_quartifyr_project()).
styling_update_style(list(heading = list(all_caps = TRUE)), "style.yaml", yes = TRUE)
} # }