I have a 3D-array (x, y, z) and would like to average values, every n values, over only one of these dimensions, using R (the first or the third, depending on my calculations).
I have seen solutions such as this one: Stats on every n rows for each column but do not seem to be able to implement it.
Many thanks in advance.