From a64bd8e67b5b1fc6bf78d94357786ef196dba38c Mon Sep 17 00:00:00 2001 From: Mark <50742923+MarkPaulin@users.noreply.github.com> Date: Thu, 22 May 2025 11:08:18 +0100 Subject: [PATCH] Fix command-line arguments R example `commandArgs()` by default returns the name of the executable and the name of the file as the first two items. Using `trailingOnly = TRUE` fixes this. --- book/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/configuration.md b/book/configuration.md index 6485331..608f639 100644 --- a/book/configuration.md +++ b/book/configuration.md @@ -248,7 +248,7 @@ with open(config_path) as file: ``` ```{code-tab} r R -args <- commandArgs() +args <- commandArgs(trailingOnly = TRUE) if (length(args) < 1) { stop("Configuration file must be passed as an argument.") }