Learn R Programming

cgraph (version 6.0.1)

bsum: Block Summation

Description

Divide a vector or array in consecutive fixed-sized blocks and sum the elements at each position in these blocks.

Usage

bsum(x, block_size = 1)

Arguments

x,

numerical vector or array, the object that is summed.

block_size,

numerical scalar, the size of each block. Defaults to 1.

Value

numerical vector.