rollwinrms: Rolling RMS

Description Usage Arguments Examples

Description

Wrapper for rollconv() offering a quick rolling windowed RMS

Usage

1
rollwinrms(x, w, ...)

Arguments

x

numeric vector; data

w

integer or numeric vector; width or shape of the rolling RMS window

na.pad

logical; should the ends be padded with NA?

B

prime; smoothness as used by the FFT algorithm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
w <- 50
weights.para <- winweights(w, type="parabolic")
weights.hann <- winweights(w, type="hann")

plot(weights.hann, type="l", ann=FALSE)
lines(weights.para)

data(xyz2)
yy <- xyz2

plot(yy, col="grey", type="l")
lines(rollwinrms(yy, weights.hann, partial=TRUE), col="blue", lwd=2)
lines(rollwinrms(yy, weights.para, partial=TRUE), col="green", lwd=2)
lines(rollwinrms(yy, w, partial=TRUE), col="red", lwd=2)

AkselA/R-rollfun documentation built on May 31, 2019, 8:41 a.m.