Commit b05fcdbc authored by Nicolau Manubens's avatar Nicolau Manubens
Browse files

Small change.

parent b724771f
...@@ -239,23 +239,6 @@ NcToArray <- function(file_to_read, dim_indices = NULL, vars_to_read = NULL, ...@@ -239,23 +239,6 @@ NcToArray <- function(file_to_read, dim_indices = NULL, vars_to_read = NULL,
#names(dim(var_result)) <- sapply(file_object$var[[var_name]]$dim, '[[', 'name') #names(dim(var_result)) <- sapply(file_object$var[[var_name]]$dim, '[[', 'name')
} }
if (!is.null(var_result)) { if (!is.null(var_result)) {
# if (units %in% c('seconds', 'minutes', 'hours', 'days', 'weeks', 'months', 'years')) {
# if (units == 'seconds') {
# units <- 'secs'
# } else if (units == 'minutes') {
# units <- 'mins'
# }
# var_result[] <- paste(var_result, units)
# } else if (grepl(' since ', units)) {
# parts <- strsplit(units, ' since ')[[1]]
# units <- parts[1]
# if (units == 'seconds') {
# units <- 'secs'
# } else if (units == 'minutes') {
# units <- 'mins'
# }
# var_result <- seq(as.POSIXct(parts[2]), length = max(var_result, na.rm = TRUE) + 1, by = units)[var_result + 1]
# }
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)) dim(var_result) <- c(setNames(1, var_tag), dim(var_result))
} }
......
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