How to pass “nothing” as an argument to `[` for subsetting?
问题 I was hoping to be able to construct a do.call formula for subsetting without having to identify the actual range of every dimension in the input array. The problem I'm running into is that I can't figure out how to mimic the direct function x[,,1:n,] , where no entry in the other dimensions means "grab all elements." Here's some sample code, which fails. So far as I can tell, either [ or do.call replaces my NULL list values with 1 for the index. x<-array(1:6,c(2,3)) dimlist<-vector('list',