diff --git a/R/Start.R b/R/Start.R index b0ad40d2c81114ce21ea635471c3d02612ca7c2a..89f87e9ce94e8bb45a3bd45adc99f2bf6984b2fe 100644 --- a/R/Start.R +++ b/R/Start.R @@ -1777,6 +1777,18 @@ Start <- function(..., # dim = indices/selectors, } } } + + # Return info about return_vars when dat > 1 + if (length(dat) > 1 & length(common_return_vars) > 0) { + .message("\n", "[ATTENTION]", + paste0("According to parameter 'return_vars', the inner dimensions: ", + paste(names(common_return_vars), collapse = ', '), + ", are common among all the datasets. Please be sure that ", + "this is expected to avoid potential wrong results, and ", + "verify the outputs carefully."), + "\n", indent = 1) + } + #//////////////////////////////////////////// # This part was above where return_vars is seperated into return_vars and common_return_vars diff --git a/R/zzz.R b/R/zzz.R index 1e56e291fa6286d0f15df806c634dc962eb29ac2..f098a3b11651e260dc72a23f5ec490e5e76a7320 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -980,7 +980,12 @@ build_work_pieces <- function(work_pieces, i, selectors, file_dims, inner_dims, if (x %in% names(depending_file_dims)) { vector_to_pick <- file_to_load_indices[depending_file_dims[[x]]] } - selectors[file_dims][[x]][[vector_to_pick]][file_to_load_indices[x]] + if (x != found_pattern_dim) { + selectors[[x]][[vector_to_pick]][file_to_load_indices[x]] + } else { + # dat_dim only has one value in each work_piece + selectors[[x]][[vector_to_pick]] + } }) names(file_selectors) <- file_dims work_piece[['file_selectors']] <- file_selectors