running_mean | R Documentation |
running_mean()
calculates the running mean in a vector with the given
bin width.
running_mean(v, binwidth)
v |
The numeric vector. |
binwidth |
Numeric constant, the size of the bin, should be meaningful,
i.e. smaller than the length of |
The running mean of v
is a w
vector of length
length(v)-binwidth+1
. The first element of w
id the average of
the first binwidth
elements of v
, the second element of
w
is the average of elements 2:(binwidth+1)
, etc.
A numeric vector of length length(v)-binwidth+1
Gabor Csardi csardi.gabor@gmail.com
Other other:
convex_hull()
,
sample_seq()
running_mean(1:100, 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.