diff --git a/DESCRIPTION b/DESCRIPTION index 17ef49c037593d28ef519e83a35f5535a5811f8e..bdc423fc5d79ac9741f8540b2f99e2dadaf7414a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: easyNCDF Title: Tools to Easily Read/Write NetCDF Files into/from Multidimensional R Arrays -Version: 0.0.4 +Version: 0.0.5 Authors@R: c( person("BSC-CNS", role = c("aut", "cph")), person("Nicolau", "Manubens", , "nicolau.manubens@bsc.es", role = c("aut", "cre"))) diff --git a/R/NcToArray.R b/R/NcToArray.R index fc4b438a475b0348eebab3da4640983d1549e520..7bb13b6888e25b4bc811992384be5edc6651c0d0 100644 --- a/R/NcToArray.R +++ b/R/NcToArray.R @@ -223,7 +223,7 @@ NcToArray <- function(file_to_read, dim_indices = NULL, vars_to_read = NULL, reorder_back <- NULL indices_dims <- names(dim_indices)[which(names(dim_indices) %in% names(dim(var_result)))] if (length(indices_dims) > 0) { - if (any(names(dim(var_result))[-which(names(dim(var_result)) %in% names(extra_dims))] != indices_dims)) { + if (any(setdiff(names(dim(var_result)), names(extra_dims)) != indices_dims)) { reorder_back <- 1:length(dim(var_result)) dims_to_reorder <- which(!(names(dim(var_result)) %in% names(extra_dims))) reorder_back[dims_to_reorder] <- dims_to_reorder[sapply(indices_dims, diff --git a/easyNCDF-manual.pdf b/easyNCDF-manual.pdf index 4234fef492cd27f25c4947c8cbcad7eedc47cdbf..d8fe6af1c55bcb70a613985da60e2fd8fca1fe36 100644 Binary files a/easyNCDF-manual.pdf and b/easyNCDF-manual.pdf differ