filter_chain {o2ools}R 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")


[Package o2ools version 0.0.1 Index]