high.pass.moving.mean | R Documentation |
Returns moving average(mean) of a vector where values lower than a given threshold are filtered
high.pass.moving.mean(v, threshold = 0, weight = 14, na.rm = T)
v |
numeric or integer: Given vector for which the filtered moving mean is computed |
threshold |
numeric (scalar): value specifying the filtering threshold (default is |
weight |
integer (scalar): Inclusion window size for computing the moving average |
na.rm |
logical: Should missing values be filtered? (default is TRUE) |
numeric (scalar): Filtered mean computed
high.pass.moving.mean(1:100, weight = 10, threshold = 95) [1] 98 # (96 + 97 + 98 + 99 + 100)/5 = 98
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.