sum_every_n | R Documentation |
Sum Every "n"th Element
sum_every_n(x, n)
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 |
sum_every_n
returns a vector of sums of every n
th element of the vector x
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.