make_tsibble: turn a tibble or dataframe into a tsibble

View source: R/time_helpers.R

make_tsibbleR Documentation

turn a tibble or dataframe into a tsibble

Description

create a 'time series tibble' from a tibble or dataframe

Usage

make_tsibble(df, date_column, group_column,
period = c("day", "week", "month", "quarter", "year"))

Arguments

df

the tibble or dataframe from which to make a tsibble

date_column

the column containing a date for each observation

group_column

the column by which to group the data for each date

period

the lubridate::floor_date period to floor the observation dates to

Value

a tsibble with the specified time interval as the Key

Examples

## Not run: 
nycflights13::weather %>%
  make_tsibble(df = .,
               date_column = time_hour,
               group_column = origin,
               period = "week")

## End(Not run)

tknoch8/helpRs documentation built on May 11, 2022, 9:34 p.m.