Description Usage Arguments Details Value Functions Examples
This function returns a moving count of the given vector.
1 2 3 4 |
vec |
A numeric vector. |
n |
An integer: moving window size, with 1 as default |
ss |
An integer: step size, only calculating at points with an equal distance ss. Namely, there are ss-1 number between each two 'consecutive' points |
na_rm |
logical. Should missing values (including NaN) be removed? |
sizeD |
logical. Only applied when ss > 1, it decides whether to get a result of smaller size. If sizeD = T, align does not affect the output. |
align |
A string denotes how to align the moving average, three options: "left", "middle", "right" |
This function counts the number of non-missing values for each moving window. It is especially designed for vec vector with missing values. Otherwise, it will return a trivial vector with all elements n.
This function returns a vector whose length is the same as that of vec or is
ceiling
((L - n + 1)/ss), (when sizeD = T), where L is the
length of vec.
movCountr
: An function equivalent to movCount(..., align = "right")
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.