Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Earth Sciences
easyNCDF
Commits
b05fcdbc
Commit
b05fcdbc
authored
Apr 06, 2017
by
Nicolau Manubens
Browse files
Small change.
parent
b724771f
Changes
1
Hide whitespace changes
Inline
Side-by-side
R/NcToArray.R
View file @
b05fcdbc
...
...
@@ -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')
}
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
))
{
dim
(
var_result
)
<-
c
(
setNames
(
1
,
var_tag
),
dim
(
var_result
))
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment