diff --git a/R/Start.R b/R/Start.R index 5bb0bda2706c333d950b23acc6b8e9a9ea91b1e4..55c16f9527464d6168d413089648670ead98b52f 100644 --- a/R/Start.R +++ b/R/Start.R @@ -2053,7 +2053,7 @@ Start <- function(..., # dim = indices/selectors, stop("The dimension(s) '", paste(undefined_dims, collapse = ", "), "' is found in the file ", file_path, " but not defined in the Start call.") - } + } } @@ -3951,6 +3951,9 @@ Start <- function(..., # dim = indices/selectors, #NOTE: When one file contains values for dicrete dimensions, rearrange the # chunks (i.e., work_piece) is necessary. if (split_multiselected_dims) { + if (!exists("indices_chunk")) { + indices_chunk <- c() + } tmp <- rebuild_array_merge_split( data_array = data_array_tmp, metadata = metadata_tmp, indices_chunk, all_split_dims, final_dims_fake, across_inner_dim, length_inner_across_dim) @@ -4086,6 +4089,9 @@ Start <- function(..., # dim = indices/selectors, #NOTE: When one file contains values for dicrete dimensions, rearrange the # chunks (i.e., work_piece) is necessary. if (split_multiselected_dims) { + if (!exists("indices_chunk")) { + indices_chunk <- c() + } tmp <- rebuild_array_merge_split( data_array = NULL, metadata = metadata_tmp, indices_chunk, all_split_dims, final_dims_fake, across_inner_dim, length_inner_across_dim)