Overview

Describes the key components underlying a tsibble, or tbl_ts: index, key, interval.

tsibble-package

tsibble: tidy temporal data frames and tools

Create/coerce and append to a tsibble

tsibble() creates a tbl_ts; as_tsibble() coerces other objects to tbl_ts.

tsibble()

Create a tsibble object

as_tsibble()

Coerce to a tsibble object

is_tsibble() is_grouped_ts()

If the object is a tsibble

new_data() append_row()

New tsibble data and append new observations to a tsibble

is_duplicated() are_duplicated() duplicates()

Test duplicated observations determined by key and index variables

Time-based verbs

Verbs that manipulate data in time-based context. Inspect implicit time gaps with has_gaps(), scan_gaps(), count_gaps() and fill_gaps(). filter_index() is a shorthand for filtering time index. index_by() and group_by_key() create a grouped tsibble, or grouped_ts, but how the data looks remains unchanged. Both requires to work with other tidyverse verbs.

has_gaps()

Does a tsibble have implicit gaps in time?

scan_gaps()

Scan a tsibble for implicit missing observations

count_gaps()

Count implicit gaps

fill_gaps()

Turn implicit missing values into explicit missing values

index_by()

Group and collapse by time index

filter_index()

A shorthand for filtering time index for a tsibble

group_by_key()

Group by key variables

A family of window functions

Map and roll over a list of elements. It features purrr-like interface and furrr-style parallel processing.

slide() slide_dfr() slide_dfc()

Sliding window calculation

slide2() slide2_dfr() slide2_dfc() pslide() pslide_dfr() pslide_dfc()

Sliding window calculation over multiple inputs simultaneously

slider() pslider()

Splits the input to a list according to the rolling window size.

partial_slider() partial_pslider()

Partially splits the input to a list according to the rolling window size.

tile() tile_dfr() tile_dfc()

Tiling window calculation

tile2() tile2_dfr() tile2_dfc() ptile() ptile_dfr() ptile_dfc()

Tiling window calculation over multiple inputs simultaneously

tiler() ptiler()

Splits the input to a list according to the tiling window size.

stretch() stretch_dfr() stretch_dfc()

Stretching window calculation

stretch2() stretch2_dfr() stretch2_dfc() pstretch() pstretch_dfr() pstretch_dfc()

Stretching window calculation over multiple simultaneously

stretcher() pstretcher()

Split the input to a list according to the stretching window size.

future_slide

Sliding window in parallel

future_stretch

Stretching window in parallel

future_tile

Tiling window in parallel

Vector

difference()

Lagged differences

Time

time_in()

If time falls in the ranges using compact expressions

yearweek() is_53weeks() yearmonth() yearquarter()

Represent year-week (ISO), year-month or year-quarter objects

units_since()

Time units since Unix Epoch

guess_frequency()

Guess a time frequency from other index objects

Calendar

holiday_aus()

Australian national and state-based public holiday

Metadata

key() key_vars()

Return key variables

key_by()

Change key variables for a given tbl_ts

index() index_var() index2() index2_var()

Return index variable from a tsibble

measures() measured_vars()

Return measured variables

interval() is_regular() is_ordered()

Meta-information of a tsibble

new_interval()

Create a time interval

Extend tsibble

Add tsibble support for custom index class with index_valid() & pull_interval(). build_tsibble() provides low-level construction for tsibble. Create a subclass of a tsibble with new_tsibble().

index_valid()

Add custom index support for a tsibble

pull_interval()

Pull time interval from a vector

build_tsibble()

Low-level constructor for a tsibble object

new_tsibble()

Create a subclass of a tsibble

Coerce to other objects

as.ts(<tbl_ts>)

Coerce a tsibble to a time series

as_tibble(<tbl_ts>) as.data.frame(<tbl_ts>)

Coerce to a tibble or data frame

Data

pedestrian

Pedestrian counts in the city of Melbourne

tourism

Australian domestic overnight trips

Tidyverse methods

Dplyr and tidyr verbs that support manipulating and reshaping tbl_ts in time-based context.

arrange(<tbl_ts>) arrange(<grouped_ts>) filter(<tbl_ts>) slice(<tbl_ts>) select(<tbl_ts>) rename(<tbl_ts>) mutate(<tbl_ts>) transmute(<tbl_ts>) summarise(<tbl_ts>) summarize(<tbl_ts>) group_by(<tbl_ts>) ungroup(<grouped_ts>) left_join(<tbl_ts>) right_join(<tbl_ts>) inner_join(<tbl_ts>) full_join(<tbl_ts>) semi_join(<tbl_ts>) anti_join(<tbl_ts>) gather(<tbl_ts>) spread(<tbl_ts>) nest(<tbl_ts>) unnest(<lst_ts>) unnest(<tbl_ts>) fill(<grouped_ts>)

Tidyverse methods for tsibble