View source: R/Module_SmoothSeries.R
function to calculate a smoothed version of an input vector (calculate the running geometric mean of log_e transformed data)
1 2 3 4 5 6 7 8 | smoothSeries(
vec.in,
gen,
filter.sides = 2,
log.transform = TRUE,
out.exp = TRUE,
na.rm = FALSE
)
|
vec.in |
vector with numeric values |
gen |
generation time (i.e. number of years to average) |
filter.sides |
time window for gen avg (1 = past values only, 2= centered) |
out.exp |
if TRUE, then convert the output back from log space) |
na.rm |
if FALSE, then any gen avg including NA values will be NA |
convergence.check |
if TRUE, do an automated convergence check |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.