ml_add_interactions: Add interaction panels to a feature list

View source: R/ml_helper.R

ml_add_interactionsR Documentation

Add interaction panels to a feature list

Description

Builds new panels from existing ones via elementwise operations. Specification accepts either a shorthand list(new = c("A","B")) (defaults to product), or a structured form ⁠list(new = list(panels=c("A","B","C"), op=⁠/⁠, how="intersect", fill=NA))⁠.

Usage

ml_add_interactions(features, interactions)

Arguments

features

List of existing panels (wide data frames with Date).

interactions

Named list describing interactions to add.

Value

The input features list with additional interaction panels.

Examples

## Not run: 
X2 <- ml_add_interactions(X, list(mom_vol = c("mom12","vol")))

## End(Not run)

PortfolioTesteR documentation built on Nov. 5, 2025, 5:23 p.m.