filter_chain: Filter chain by parameter threshold

View source: R/filter_chain.R

filter_chainR Documentation

Filter chain by parameter threshold

Description

Mask target columns whenever a parameter column fails a threshold test.

Usage

filter_chain(out, param, thresh, comparator = "<=", target = "alpha")

Arguments

out

A data frame of class outbreaker_chains.

param

Name of the parameter prefix (e.g. "kappa").

thresh

Numeric threshold.

comparator

A string comparator: one of "<=", ">=", "<", ">", "==".

target

Name of the target prefix to mask (e.g. "alpha").

Value

An outbreaker_chains data frame with target_* entries set to NA wherever param_* comparator thresh is FALSE.

Examples

# Mask alpha_i whenever kappa_i > 1
filter_chain(out, param = "kappa", thresh = 1, comparator = "<=", target = "alpha")


o2ools documentation built on June 8, 2025, 10:18 a.m.