panel_tail: Filter the last N rows (Tail) for multiple time series

Description Usage Arguments Value See Also Examples

View source: R/modeltime-recursive.R

Description

Filter the last N rows (Tail) for multiple time series

Usage

1
panel_tail(data, id, n)

Arguments

data

A data frame

id

An "id" feature indicating which column differentiates the time series panels

n

The number of rows to filter

Value

A data frame

See Also

Examples

1
2
3
4
5
library(timetk)

# Get the last 6 observations from each group
m4_monthly %>%
    panel_tail(id = id, n = 6)

modeltime documentation built on July 16, 2021, 9:08 a.m.