Commit c04846f0 authored by Nicolau Manubens Gil's avatar Nicolau Manubens Gil
Browse files

Bug in nc2a, not dropping var_dim.

parent 55c6ff58
......@@ -246,7 +246,7 @@ NcToArray <- function(file_to_read, dim_indices = NULL, vars_to_read = NULL,
#names(dim(var_result)) <- sapply(file_object$var[[var_name]]$dim, '[[', 'name')
}
if (!is.null(var_result)) {
if (!drop_var_dim || (length(vars_to_read_vector) == 1)) {
if (!(drop_var_dim && (length(vars_to_read_vector) == 1))) {
dim(var_result) <- c(setNames(1, var_tag), dim(var_result))
}
attr(var_result, 'variables') <- structure(list(atts), .Names = var_name)
......
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