yq_merge_cmd: Merge two YAML files using the 'yq' tool.

View source: R/yq.R

yq_merge_cmdR Documentation

Merge two YAML files using the yq tool.

Description

Merge two YAML files using the yq tool.

Usage

yq_merge_cmd(
  f1,
  f2,
  stdout = TRUE,
  check_yq = TRUE,
  check_exit = TRUE,
  yq_binary = getOption("scdrake_yq_binary")
)

Arguments

f1, f2

A character scalar: path to YAML file. f2 is the file whose parameters will overwrite those in f1.

stdout

A character or logical scalar, or NULL: passed to base::system2().

  • For character scalar: path to file into which the resulting merged YAML file will be written. If empty string (""), the result will be written to R console.

  • For logical scalar TRUE: return the stdout as a character scalar.

  • For logical scalar FALSE, or NULL: discard the stdout.

check_yq

A logical scalar: if TRUE, check yq tool presence with check_yq() prior to merging.

check_exit

A logical scalar: if TRUE and stdout is FALSE, check exit code of shell command used for merging.

yq_binary

A character scalar: path to yq tool's binary.

Value

An output from base::system2() - depends on the stdout argument.


bioinfocz/scdrake documentation built on Jan. 29, 2024, 10:24 a.m.