Expand path macros with enhanced patterns
expand_path_macros_enhanced.RdEnhanced version of expand_path_macros that supports additional patterns and context-aware expansion.
Usage
expand_path_macros_enhanced(
path_template,
name = NULL,
index = NULL,
stem = NULL,
run = NULL,
date = NULL,
time = NULL,
user = NULL,
host = NULL,
...
)Examples
# \donttest{
# Basic expansion
expand_path_macros_enhanced(
"results/{name}_{date}.rds",
name = "analysis"
)
#> [1] "results/analysis_20260206.rds"
# With multiple macros
expand_path_macros_enhanced(
"{user}/runs/{date}/{time}/output_{index}.csv",
index = 1
)
#> [1] "runner/runs/20260206/030258/output_1.csv"
# Custom values
expand_path_macros_enhanced(
"models/{experiment}/{model}_{version}.pkl",
experiment = "exp001",
model = "resnet",
version = "v2"
)
#> [1] "models/exp001/resnet_v2.pkl"
# }