Divide a vector or array in consecutive blocks of n
elements and sum the elements at each position in these blocks.
bsum(x, n = 1)
numeric vector or array, the object that is summed.
numeric scalar, block size. Defaults to 1.
numeric vector, a n
-dimensional vector, where the 1th element of the vector is the sum of each 1th element of the blocks, the 2nd element of the vector is the sum of each 2nd element of the blocks, and so on.