knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of tsextras is to provide helper functions to analyse time series objects.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("alberto-mateos-mo/tsextras")
ts_plot()
function is a wrapper for other functions that plot ts objects.
library(tsextras) library(ggplot2) ts_plot(AirPassengers)
ts_trend()
extracts and plots the trend of a time series.
library(tsextras) library(ggplot2) ts_trend(AirPassengers, order = 12)
ts_season()
extracts and plots seasonal component of a time series.
library(tsextras) library(ggplot2) s <- AirPassengers x <- ts_trend(s) ts_season(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.