orderly_run_info: Information on current orderly run

Description Usage Arguments Value Warning Examples

View source: R/recipe_run.R

Description

This function allows inspection of some of orderly's metadata during an orderly run. The format returned is internal to orderly and subject to change. It is designed to be used within report code. To use in conjunction with orderly_test_start(), you must pass in the path to the report in question.

Usage

1

Arguments

path

Path to the report currently being run. This should be left as NULL when running a report, and the path to the report being run should be used when using orderly_test_start()

Value

A list of metadata about the current report

Warning

It is important that this data is treated as readonly!

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
path <- orderly::orderly_example("demo")

# This example uses orderly_run_info within its script, saving the
# output to "output.rds"
readLines(file.path(path, "src", "use_dependency", "script.R"))

# Run the dependency:
id <- orderly::orderly_run("other", list(nmin = 0), root = path)
orderly::orderly_commit(id, root = path)

# Then the report
id <- orderly::orderly_run("use_dependency", root = path)

# This is the contents:
readRDS(file.path(path, "draft", "use_dependency", id, "info.rds"))

orderly documentation built on Sept. 22, 2021, 5:09 p.m.