This function selects a subset of ensemble members from an array containing any number of dimensions.
SelIndices(var, posdim, limits)
An array with any number of dimensions.
The dimension along which the ensemble subset should be selected.
The lower and upper limits for the selection of ensemble members along the posdim dimension.
The subsetted array.
# NOT RUN {
a <- array(rnorm(24), dim = c(2, 3, 4, 1))
print(a)
print(a[, , 2:3, ])
print(dim(a[, , 2:3, ]))
print(SelIndices(a, 3, c(2, 3)))
print(dim(SelIndices(a, 3, c(2, 3))))
# }
Run the code above in your browser using DataLab