Description Usage Arguments Value Author(s) Examples
These functions plots the observed, trend, seasonal, and random components of time series into one figure (ggdecompose) or into separate figures (ggobserve, ggtrend, ggseason, ggrandom, respectively). These functions also plots detrended and deseasonalised time series (ggdetrend and ggdeseason, respectively). These can be integrated with ggplot functions.
1 2 3 4 5 6 7 | ggdecompose(x)
ggobserve(x)
ggtrend(x)
ggseason(x)
ggrandom(x)
ggdetrend(x)
ggdeseason(x)
|
x |
a data frame generated by either dts or dts2 functions. |
This returns to a plot.
Brisneve Edullantes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | data(co2)
x <- dts2(co2, type ="additive")
#plots decomposed time series into one figure
ggdecompose(x)+
xlab("Date")+
ylab("Atmospheric Concentration of CO2")
#plots components of time series into separate figure
ggobserve(x)+
xlab("Date")+
ylab("Observed Atmospheric Concentration of CO2")
ggtrend(x)+
xlab("Date")+
ylab("Trend of Atmospheric Concentration of CO2")
ggseason(x)+
xlab("Date")+
ylab("Seasonality of Atmospheric Concentration of CO2")
ggrandom(x)+
xlab("Date")+
ylab("Random Variation of Atmospheric Concentration of CO2")
#plots detrended and deseasonalised Time Series
ggdetrend(x)
ggdeseason(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.