cumwsum

Details

Calculate the cumulative weighted sum of X with Y as the weights. The result is a vector of the same length as X. NULL values are ignored in the calculation.

Examples

cumwsum(2.2 1.1 3.3, 4 5 6);
// output
[8.8,14.3,34.1]

cumwsum(1 NULL 1, 1 1 1);
// output
[1,1,2]

Related function: wsum