diff --git a/R/Start.R b/R/Start.R index c7cc0ff28a4163270f3158bda5ad822bdf7b4c40..5bb0bda2706c333d950b23acc6b8e9a9ea91b1e4 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.") } }