Learn R Programming

modeltime (version 1.1.1)

panel_tail: 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

Run this code
# NOT RUN {
library(timetk)

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

# }

Run the code above in your browser using DataLab