-
Smoothing or moving average use ksmooth …
Wonosari Smoothing or moving average use ksmooth() when kernel is “box”, it is the same as moving average by filter() except that ksmooth() can handle the edges better. Example ksmooth(data, kernel = “box”, bandwidth = 3)
-
Moving average in R Median: runmed() M …
Lárisa Moving average in R Median: runmed() Mean: filter() ex) runmed(data, 3) filter(data, rep(1/3, 3))