dot-pick_first: Pick First Matching Rule

.pick_firstR Documentation

Pick First Matching Rule

Description

This function evaluates a list of rules and returns the action associated with the first rule that matches. If no rules match, it returns a default value.

Usage

.pick_first(rules, default = NULL)

Arguments

rules

A list of rules, where each rule is a list with 'when' and 'do' elements.

default

The default value to return if no rules match (default is NULL).

Value

The action associated with the first matching rule, or the default value.


ggpedigree documentation built on March 16, 2026, 9:07 a.m.