Skip to content

Serializes the same portable recipe representation as recipe_export_json to a YAML string or file.

Usage

recipe_export_yaml(recipe, file = NULL)

Arguments

recipe

An omop_recipe object.

file

Character or NULL; file path to write. If NULL, returns the YAML string directly.

Value

If file is NULL, returns a YAML string. Otherwise writes to file and returns the file path invisibly.

Examples

if (FALSE) { # \dontrun{
yaml <- recipe_export_yaml(recipe)
recipe_export_yaml(recipe, file = "my_recipe.yml")
} # }