Overview

tsibble-package

tsibble: tidy temporal data frames and tools

Create/coerce to a tsibble

tsibble()

Create a tsibble object

as_tsibble()

Coerce to a tsibble object

is_tsibble() is_grouped_ts()

Test if the object is a tsibble

build_tsibble()

Construct a tsibble object

Tsibble verbs

index_by()

Group by time index

fill_na()

Turn implicit missing values into explicit missing values

count_gaps() gaps()

Count implicit gaps

find_duplicates()

Find duplication of key and index variables

split_by()

Split a data frame into a list of subsets by variables

Vector

difference()

Lagged differences

Windowed functions

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.

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()

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

Index

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

Key helpers

key() key_vars() unkey()

Return key variables

key_size() n_keys() key_indices()

Compute sizes of key variables

key_update()

Change/update key variables for a given tbl_ts

key_sum()

Summary of key variables

Tsibble helpers

id()

Identifier to construct structural variables

interval() index() index2()

Return index and interval from a tsibble

measured_vars()

Return measured variables

is_regular() is.regular() is_ordered()

is_regular checks if a tsibble is spaced at regular time or not; is_ordered checks if a tsibble is ordered by key and index.

case_na()

A thin wrapper of dplyr::case_when() if there are NAs

Extend tsibble

index_valid()

Extensible index type to tsibble

pull_interval() time_unit()

Extract time interval from a vector

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

left_join(<tbl_ts>) right_join(<tbl_ts>) inner_join(<tbl_ts>) full_join(<tbl_ts>) semi_join(<tbl_ts>) anti_join(<tbl_ts>) 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>) gather(<tbl_ts>) spread(<tbl_ts>) nest(<tbl_ts>) unnest(<lst_ts>)

Tidyverse methods for tsibble