rolling_sd_3 | R Documentation |
This function is called within the third filter, and used to calculate a rolling standard deviation with a window including the 2 leading values.
rolling_sd_3(x)
x |
an indexed position of a value in a vector for which the rolling standard deviation is needed |
the standard deviation of x, and the two leading values
# Calculate rolling Standard Deviation
set.seed(1234)
x <- rnorm(n = 100, mean = 10, sd = 1)
rolling_sd_3(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.