Description Usage Arguments Value Note Author(s) Examples
This function returns partial sums of the input vector.
1 | rolling_sum(temp, window_l)
|
temp |
a vector that needs to be summed. |
window_l |
number of consecutive elements in |
A numeric vector of length length(temp)-window_l+1
is returned.
Function will be stopped when window_l > length(temp)
.
An NA value in x will be treat as 0 in rolling_sum(x).
Xiaojing Ni
1 | rolling_sum(1:10, 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.