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.
f2is the file whose parameters will overwrite those inf1.- stdout
A character or logical scalar, or
NULL: passed tobase::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, orNULL: discard the stdout.
- check_yq
A logical scalar: if
TRUE, checkyqtool presence withcheck_yq()prior to merging.- check_exit
A logical scalar: if
TRUEandstdoutisFALSE, check exit code of shell command used for merging.- yq_binary
A character scalar: path to
yqtool's binary.
Value
An output from base::system2() - depends on the stdout argument.