sum_every_n {COMMA} | R Documentation |
Sum Every "n"th Element
Description
Sum Every "n"th Element
Usage
sum_every_n(x, n)
Arguments
x |
A numeric vector to sum over |
n |
A numeric value specifying the distance between the reference index and the next index to be summed |
Value
sum_every_n
returns a vector of sums of every n
th element of the vector x
.
[Package COMMA version 1.0.0 Index]