Skip to content

Convenience wrapper around recipe_export_json and recipe_export_yaml. The format is inferred from the file extension unless supplied explicitly.

Usage

recipe_save(recipe, file, format = NULL)

Arguments

recipe

An omop_recipe object.

file

Character; destination path ending in .json, .yml, or .yaml.

format

Character or NULL; optional explicit format: "json" or "yaml".

Value

The file path invisibly.

Examples

if (FALSE) { # \dontrun{
recipe_save(recipe, "analysis_recipe.yml")
recipe_save(recipe, "analysis_recipe.json")
} # }