adjust_ts_data_mv: Adjust 'ts_data_mv'

View source: R/ts_data_mv.R

adjust_ts_data_mvR Documentation

Adjust ts_data_mv

Description

Restore the multivariate time-series metadata after subsetting or data manipulation.

Usage

adjust_ts_data_mv(
  data,
  y,
  x = NULL,
  sw = 1,
  variables = NULL,
  lags = NULL,
  representation = c("aligned", "windowed")
)

Arguments

data

Matrix or data.frame.

y

Character scalar. Target variable name.

x

Character vector. Auxiliary variable names.

sw

Integer. Temporal width of the representation.

variables

Character vector. Variables represented in the object.

lags

Named list of lag positions per variable.

representation

Character. Either "aligned" or "windowed".

Details

This helper mirrors adjust_ts_data() from the univariate workflow. It preserves whether the multivariate object is aligned (sw = 1) or lagged (sw > 1).

Value

A ts_data_mv object.


tspredit documentation built on Sept. 9, 2026, 9:08 a.m.