From 1546353b02924118d1d14e6807fed66b4a7b4c63 Mon Sep 17 00:00:00 2001 From: vagudets Date: Wed, 30 Apr 2025 10:36:12 +0200 Subject: [PATCH] Fix undefined inner dim check when there are multiple undefined inner dims --- R/Start.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/Start.R b/R/Start.R index c7cc0ff..5bb0bda 100644 --- a/R/Start.R +++ b/R/Start.R @@ -2048,8 +2048,10 @@ Start <- function(..., # dim = indices/selectors, # Not all the inner dims are defined in Start() call if (!all(names(data_dims) %in% expected_inner_dims[[i]])) { tmp <- names(data_dims)[which(!names(data_dims) %in% expected_inner_dims[[i]])] - if (data_dims[tmp] != 1) { - stop("The dimension '", tmp, "' is found in the file ", file_path, + undefined_dims <- tmp[data_dims[tmp] != 1] + if (length(undefined_dims > 0)) { + stop("The dimension(s) '", paste(undefined_dims, collapse = ", "), + "' is found in the file ", file_path, " but not defined in the Start call.") } } -- GitLab