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

View source: R/modeltime-recursive.R

panel_tailR Documentation

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

Description

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

Usage

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

  • recursive() - used to generate recursive autoregressive models

Examples

library(timetk)

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


modeltime documentation built on Oct. 23, 2024, 1:07 a.m.