Skip to contents

Serialises the essential information of a rap_object - parameters, pipeline steps, and package versions - into a compact YAML file (typically under 50 lines). The recipe can be shared with colleagues and re-imported with sus_rap_from_recipe().

Usage

sus_rap_recipe(
  rap,
  file_path = NULL,
  include_data_hash = TRUE,
  lang = "pt",
  overwrite = FALSE
)

Arguments

rap

A rap_object returned by sus_rap_read() or sus_rap_export().

file_path

character(1) - Output path for the .yaml file. If NULL, a timestamped file is created in the working directory.

include_data_hash

logical(1) - Compute and embed a hash of the input parameters for traceability. Default TRUE.

lang

character(1) - Language for messages.

overwrite

logical(1) - Overwrite existing file. Default FALSE.

Value

Invisibly, the path of the created .yaml file.

Examples

if (FALSE) { # \dontrun{
rap <- sus_rap_read("pipeline_sp.R")
sus_rap_recipe(rap, "pipeline_sp.yaml")
} # }