Commit 549eb340 authored by Nicolau Manubens Gil's avatar Nicolau Manubens Gil
Browse files

Merge branch 'develop-hotfixes-0.0.4' into 'master'

Returned dimensions as requested in dim_indices. Fixes #2.



See merge request !11
parents 24920257 09274934
......@@ -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,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment