ml_panel_reduce: Reduce multiple panels with a binary operator

View source: R/ml_helper.R

ml_panel_reduceR Documentation

Reduce multiple panels with a binary operator

Description

Folds a list of panels using ml_panel_op() across a set of named panels.

Usage

ml_panel_reduce(features, panels, op = `*`, how = "intersect", fill = NA_real_)

Arguments

features

List of panels (each a wide data frame with Date).

panels

Character vector of names in features to reduce (length \ge 2).

op

Binary function to apply elementwise.

how

Column-set policy passed to ml_panel_op().

fill

Fill value for how="union".

Value

A data.frame panel (wide) with the reduced result.

Examples

## Not run: 
# product of three panels
prod_panel <- ml_panel_reduce(X, c("mom12","vol","rsi14"), op = `*`)

## End(Not run)

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