Hi @vagudets
This is the fix for the bug you found. When drop = T
is used and the output should have one dimension that length is > 1, error is returned. E.g.,
arr <- array(1:3, dim = c(dat = 1, var = 1, sdate = 3))
Subset(arr, "sdate", 1:2, drop = T)
Error in dim(subset) <- dim(x)[dim_names] :
dims [product 3] do not match the length of object [2]
It is because the output dimension is not well-defined.
Can you check if the fix works as expected? Thanks!
Cheers,
An-Chi