diurnalAdj | R Documentation |
Performs a diurnal adjustment of the durations, i.e. removes a daily seasonal component. Four different methods of diurnal adjustment are available, namely "cubicSpline", "supsmu" (Friedman's SuperSmoother), "smoothSpline" (smoothed version of the cubic spline), or "FFF" (Flexible Fourier Form).
diurnalAdj(dur, method = "cubicSpline", nodes = c(seq(600, 1105, 60), 1105),
aggregation = "all", span = "cv", spar = 0, Q = 4, returnSplineFnc = FALSE)
dur |
a data.frame containing the columns |
method |
the method used. One of "cubicSpline", "supsmu", "smoothSpline", or "FFF". |
nodes |
only for |
aggregation |
what type of aggregation to use. Either "weekdays", "all", or "none". If for example "weekdays" is chosen, all Mondays will have the same daily seasonal component, and so on. |
span |
argument passed to supsmu if |
spar |
argument passed to smooth.spline if |
Q |
number of trigonometric function pairs for |
returnSplineFnc |
if |
If returnSplineFnc
is FALSE
(default): the input
data.frame dur
with an added column of the diurnally adjusted
durations called 'adjDur'.
Otherwise, a list of spline objects containing the coefficents of the spline function.
Markus Belfrage
diurnalAdj(durData, aggregation = "none", method = "supsmu")
## Not run:
head(durData)
f <- diurnalAdj(durData, aggregation = "weekdays", method = "FFF", Q = 3)
head(f)
f <- diurnalAdj(durData, aggregation = "all", returnSplineFnc = TRUE)
f
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.