View source: R/Module_calcPercChange.R
this function applies a basic deterministic with various user options (e.g. log transform, gen avg smoothing, time window to use). For a single vector, use calcPercChangeSimple()
1 2 3 4 5 6 7 8 9 10 | calcPercChange(
X,
gen.in = 4,
slope.num.gen = 3,
extra.yrs = 0,
genmean.smoothing = TRUE,
log.transform = TRUE,
out.exp = FALSE,
tracing = FALSE
)
|
X |
a data frame with Years x Stocks. Row labels are years, no missing years allowed, NA are possible, but will result in NA for |
gen.in |
= average generation time |
slope.num.gen |
number of generations over which to calculate the perc change |
extra.yrs |
to handle COSEWIC "extra year". default is 0 |
genmean.smoothing |
if TRUE, apply the smoothSeries() function. default is TRUE |
log.transform |
if TRUE, log-transform the time series before calculating the smoothed series. default is TRUE |
out.exp |
if TRUE, take the exponent of the smoothed series before calculating the perc change. default is FALSE |
tracing |
if TRUE, print various diagnostics to the command line. default is FALSE |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.