make_run_dir_name: Build the canonical run-directory basename

View source: R/utils-render_report.R

make_run_dir_nameR Documentation

Build the canonical run-directory basename

Description

Returns the basename used for both the per-run figure directory and the filename prefix of every figure it contains. When task is supplied, the name is namespaced as ⁠task-{task}_run-XX⁠ so that different tasks sharing the same run number (a valid BIDS pattern, e.g. task-study_run-01 and task-test_run-01) do not collide. When task is NULL, the legacy run-XX form is returned for backwards compatibility.

Usage

make_run_dir_name(run_num, task = NULL)

Arguments

run_num

Run number (numeric or character coercible to numeric)

task

Optional BIDS task name. Defaults to NULL

Details

This is the single source of truth for run-directory naming: every writer builds the directory and its contained filenames from it, and every reader either globs with run_dir_pattern() (then parses the numeric run via ⁠run-(\\d+)⁠) or derives filenames from basename(run_dir).

Value

A character string, e.g. "task-study_run-01" or "run-01"


eyeris documentation built on June 19, 2026, 9:08 a.m.