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
startR
Commits
041192db
Commit
041192db
authored
Nov 04, 2022
by
aho
Browse files
Bugfix for improved Subset() that along cannot be NULL.
parent
776b5597
Pipeline
#8512
passed with stage
in 44 minutes and 57 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
R/Start.R
View file @
041192db
...
...
@@ -2661,8 +2661,15 @@ Start <- function(..., # dim = indices/selectors,
selector_indices_to_take
<-
which
(
selector_file_dim_array
==
j
,
arr.ind
=
TRUE
)[
1
,
]
names
(
selector_indices_to_take
)
<-
names
(
selector_file_dims
)
selector_store_position
[
names
(
selector_indices_to_take
)]
<-
selector_indices_to_take
sub_array_of_selectors
<-
Subset
(
selector_array
,
names
(
selector_indices_to_take
),
as.list
(
selector_indices_to_take
),
drop
=
'selected'
)
#TODO: Check if the non-subset part makes sense. "selector_indices_to_take" is an array if
# "selector_file_dims" is not 1 (if selector is an array with a file_dim dimname, ie.,
# time = [sdate = 2, time = 4].
if
(
!
is.null
(
names
(
selector_indices_to_take
)))
{
sub_array_of_selectors
<-
Subset
(
selector_array
,
names
(
selector_indices_to_take
),
as.list
(
selector_indices_to_take
),
drop
=
'selected'
)
}
else
{
sub_array_of_selectors
<-
selector_array
}
if
(
debug
)
{
if
(
inner_dim
%in%
dims_to_check
)
{
...
...
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