Basically I have a 4 dimensional array of various radar variables named pol which has dim (5,1191,360,11)
For part of my analysis I want to subset the analysis to only those pixels below a certain height, note pol[2,,,] contains the height information ideally I would like to do something like this
Newpol<-pol[pol[2,,,]<5,]
the issue is this construct is not for four dimensional features, I have tried
Newpol[,,,]<-pol[,,,][pol[2,,,]<5,,,]
but this results in the error "Logical subscript too long"
My goal is to obtain a four dimensional array only consisting of the elements of pol where pol[2,,,]<5.
Thanks in advance for your assistance.