Convert

tsbox is built around a set of converters, which convert time series stored as ts, xts, data.frame, data.table or tibble to each other.

ts_data.frame() ts_df() ts_data.table() ts_dt() ts_tbl() ts_tibbletime() ts_timeSeries() ts_ts() ts_tsibble() ts_tslist() ts_xts() ts_zoo()

Convert Everything to Everything

Combine and Separate

A set of helper functions to combine multiple time series

ts_c()

Collect Time Series

ts_bind() ts_chain()

Bind Time Series

ts_span() ts_start() ts_end()

Limit Time Span

ts_pick()

Pick Series (Experimental)

Transform

Transformation functions with a unified interface for common time series opperations

ts_scale()

Normalized Time Series

ts_trend()

Loess Trend Estimation

ts_pc() ts_diff() ts_pcy() ts_diffy()

First Differences and Percentage Change Rates

ts_compound() ts_index()

Indices from Levels or Percentage Rates

ts_lag()

Lag or Lead of Time Series

Plot

Simple and fast plotting functions for any time series

ts_plot()

Plot Time Series

ts_ggplot() theme_tsbox() colors_tsbox() scale_color_tsbox() scale_fill_tsbox()

Plot Time Series, Using ggplot2

ts_save()

Save Previous Plot

Reshape

Reshaping wide data frames into long data frames and back

ts_long() ts_wide()

Reshaping Multiple Time Series

Frequency

Functions to manipulate frequency

ts_frequency()

Change Frequency

ts_regular()

Enforce Regularity

ts_na_omit()

Omit NA values

User defined ts-functions

ts_ turns existing functions into functions that can deal with any ts- boxable time series object. The example functions are useful themself.

ts_prcomp() ts_dygraphs() ts_forecast() ts_seas()

Principal Components, Dygraphs, Forecasts, Seasonal Adjustment

load_suggested() ts_() ts_apply()

Constructing ts-Functions

copy_class()

Re-Class ts-Boxable Object

relevant_class()

Extract Relevant Class

ts_boxable()

Test if an Object is ts-Boxable

ts_dts()

Internal Time Series Class

Arithmetic operators

Arithmetic operators can be applied on ts-boxable objects

`%ts+%`() `%ts-%`() `%ts*%`() `%ts/%`()

Arithmetic Operators for ts-boxable objects