Skip to contents

Removes mutable metadata tags from a run. If tags = NULL, all tags for the run are removed. Removing absent tags is idempotent.

Usage

ledgr_run_untag(snapshot, run_id, tags = NULL)

Arguments

snapshot

A sealed ledgr_snapshot object. Use ledgr_snapshot_load(db_path, snapshot_id) to resume from a durable DuckDB file in a new R session.

run_id

Run identifier.

tags

Character vector of tags to remove, or NULL to remove all tags from the run. Use NULL for "all tags"; character(0) is treated as an invalid empty tag set.

Value

The input ledgr_snapshot, invisibly.

Examples

bars <- subset(ledgr_demo_bars, instrument_id == "DEMO_01")
snapshot <- ledgr_snapshot_from_df(utils::head(bars, 10))
strategy <- function(ctx, params) ctx$flat()
exp <- ledgr_experiment(snapshot, strategy, opening = ledgr_opening(cash = 1000))
bt <- ledgr_run(exp, params = list(), run_id = "flat")
ledgr_run_tag(snapshot, bt$run_id, c("baseline", "demo"))
ledgr_run_untag(snapshot, bt$run_id, "demo")
close(bt)
ledgr_snapshot_close(snapshot)